분류 전체보기

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

180608_1076_저항

//https://www.acmicpc.net/problem/1076 #include #include #include using namespace std; struct res{ string color; int value; long long int digit;}; res table[10]; void maketable(){ table[0].color="black"; table[0].value=0; table[0].digit=1; table[1].color="brown"; table[1].value=1; table[1].digit=10; table[2].color="red"; table[2].value=2; table[2].digit=100; table[3].color="orange"; table[3].val..

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

180607_5597_과제안내신분?

//https://www.acmicpc.net/problem/5597 #include using namespace std; int max(int a, int b) { return a>b ? a : b;}int min(int a, int b) { return a x; chk[x]=1; } int ans1=0, ans2=0; for(int i=1; i

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

180604_10769_행복한지 슬픈지

//https://www.acmicpc.net/problem/10769 #include using namespace std; int main(){ char str[256]; cin.getline(str, 255); int cnt[2]={0,0}; for(int i=0; str[i]!=0; i++){ if(str[i]==':' && (str[i+1]!=0 && str[i+2]!=0)){ if(str[i+1]=='-'){ if(str[i+2]==')') cnt[0]++; else if(str[i+2]=='(') cnt[1]++; } } } if(cnt[1]==0 && cnt[0]==0) cout cnt[1]) cout

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

180602_4690_완전 세제곱

//https://www.acmicpc.net/problem/4690#include using namespace std; int main(){ int a,b,c,d; for(a=2; a

bong sue
'분류 전체보기' 카테고리의 글 목록 (5 Page)