Submission #14380

#TimeUsernameProblemLanguageResultExecution timeMemory
14380dydnjs그릇 (KOI13_bowl)C++98
16 / 16
0 ms1084 KiB
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<algorithm> #include<queue> #define INF 987654321 using namespace std; char a[51]; int main() { //freopen("input.txt","r", stdin); int i,j,sum=0; scanf("%s", a); char a1, a2; for(i=0; i<strlen(a); i++) { a2=a[i]; if(i==0) { sum+=10; a1=a[i]; } else if(i!=0&&a1=='('&&a2=='(') { sum+=5; a1='('; } else if(i!=0&&a1=='('&&a2==')') { sum+=10; a1=')'; } else if(i!=0&&a1==')'&&a2=='(') { sum+=10; a1='('; } else if(i!=0&&a1==')'&&a2==')') { sum+=5; a1=')'; } } printf("%d\n",sum); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...