180127_2309_일곱 난쟁이
//https://www.acmicpc.net/problem/2309 #include #include using namespace std;int h[10]; int main(){ int sum=0; bool chk=0; for(int i=1; i> h[i]; sum+=h[i]; } sort(h+1,h+10); bool index[10]={0,}; for(int i=1; i
//https://www.acmicpc.net/problem/2309 #include #include using namespace std;int h[10]; int main(){ int sum=0; bool chk=0; for(int i=1; i> h[i]; sum+=h[i]; } sort(h+1,h+10); bool index[10]={0,}; for(int i=1; i
//https://www.acmicpc.net/problem/1065 #include using namespace std; int main(){ int n,cnt; cin >> n; cnt=n; for(int i=1; i0) { if(now%10-(now%100)/10 != diff) {cnt--; break;} now/=10; } /********* while(now>0) { if(now%10-(now%100)/10 != diff) {cnt--; break;} now/=10; if(now
#include using namespace std;int map[4][4];bool visitednum[10000000];int dy[4]={0,0,1,-1};int dx[4]={1,-1,0,0}; int cnt; int dfs(int y, int x, int depth, int now){ if(depth==7) { if(!visitednum[now]) {visitednum[now]=1; cnt++;} return 0; } now*=10; now+=map[y][x]; for(int i=0; i=0 && ny=0 && nx> tc; for(int t=1; t
//https://www.acmicpc.net/problem/2616#include #include using namespace std;int dp[4][50001];int train[50001]; int main(){ int n,m; cin >> n; for(int i=1; i> x; train[i]=train[i-1]+x; } cin >> m; for(int i=1*m; i