백준

알고리즘 문제 풀이/1DP_과제(~180615)

171224_1357_뒤집힌 덧셈

//https://www.acmicpc.net/problem/1357 #include using namespace std;int rev(int n){ int revn=0; while(n>0) { revn*=10; revn+=n%10; n/=10; } return revn;}int main(){ int x,y; cin >> x >> y; cout

알고리즘 문제 풀이/1DP_과제(~180615)

171223_1547_공

//https://www.acmicpc.net/problem/1547 #include using namespace std; int main(){ int m; bool cup[4]={0,1,0,0}; cin >> m; for(int i=0 ;i> x >> y; int tmp=cup[x]; cup[x]=cup[y]; cup[y]=tmp; } for(int i=1; i

알고리즘 문제 풀이/1DP_과제(~180615)

171222_14646_욱제는 결정장애야!!

//https://www.acmicpc.net/problem/14646 #include using namespace std;bool menu[100001]; int main(){ int n,x; cin >> n; int cnt=0; int max=0; for(int i=0; i> x; if(menu[x]) cnt--; else { menu[x]=true; cnt++; } if(cnt>max) max=cnt; } cout

알고리즘 문제 풀이/1DP_과제(~180615)

171221_2010_플러그

//https://www.acmicpc.net/problem/2010 #include using namespace std; int main(){ int n; cin >> n; int sum=0; for(int i=0; i> x; sum+=x; } cout

bong sue
'백준' 태그의 글 목록 (24 Page)