# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
14379 |
2015-05-13T13:43:04 Z |
dydnjs |
그릇 (KOI13_bowl) |
C++ |
|
0 ms |
1084 KB |
#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];
}
if(i!=0&&a1=='('&&a2=='(') {
sum+=5;
a1='(';
}
if(i!=0&&a1=='('&&a2==')') {
sum+=10;
a1=')';
}
if(i!=0&&a1==')'&&a2=='(') {
sum+=10;
a1='(';
}
if(i!=0&&a1==')'&&a2==')') {
sum+=5;
a1=')';
}
}
printf("%d\n",sum);
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1084 KB |
Output is correct |
2 |
Incorrect |
0 ms |
1084 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1084 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1084 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1084 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1084 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |