Submission #7950349
Source Code Expand
#include<bits/stdc++.h> using namespace std; char a[20]; int l,s; bool c(char x,char y) { if(x=='i'&&y=='i')return 1; if(x=='w'&&y=='w')return 1; if(x=='('&&y==')')return 1; if(x==')'&&y=='(')return 1; return 0; } int main() { gets(a); l=strlen(a); s=(l+1)/2; for(int i=0; i<(l+1)/2; i++) if(c(a[i],a[l-1-i])) s--; printf("%d\n",s); return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - (iwi) |
User | luogu_bot4 |
Language | C++ (GCC 5.4.1) |
Score | 100 |
Code Size | 380 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 256 KB |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:13:2: warning: ‘char* gets(char*)’ is deprecated [-Wdeprecated-declarations] gets(a); ^ In file included from /usr/include/c++/5/cstdio:42:0, from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:46, from ./Main.cpp:1: /usr/include/stdio.h:638:14: note: declared here extern char *gets (char *__s) __wur __attribute_deprecated__; ^ ./Main.cpp:13:2: warning: ‘char* gets(char*)’ is deprecated [-Wdeprecated-declarations] gets(a); ^ In file included from /usr/include/c++/5/cstdio:42:0, from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:46, from ./Main.cpp:1: /usr/include/stdio.h:638:14: note: declared here extern char *gets (char *__s) __wur __attribute_deprecated__; ^ ./Main.cpp:13:8: warning: ‘char* gets(char*)’ is deprecated [-Wdeprecated-declarations] gets(a); ^ In file included from /usr/include/c++/5/cstdio:42:0, from /usr...
Judge Result
Set Name | Set 01 | ||
---|---|---|---|
Score / Max Score | 100 / 100 | ||
Status |
|
Set Name | Test Cases |
---|---|
Set 01 | 00_sample1.in, 00_sample2.in, 01_08.in, 02_02.in, 03_08.in, 04_02.in, 05_03.in, 06_04.in, 07_04.in, 08_08.in, 09_04.in, 10_03.in, 11_09.in, 12_02.in, 13_07.in, 14_07.in, 15_04.in, 16_10.in, 17_10.in, 18_10.in, 19_10.in, 20_10.in |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample1.in | AC | 1 ms | 256 KB |
00_sample2.in | AC | 1 ms | 256 KB |
01_08.in | AC | 1 ms | 256 KB |
02_02.in | AC | 1 ms | 256 KB |
03_08.in | AC | 1 ms | 256 KB |
04_02.in | AC | 1 ms | 256 KB |
05_03.in | AC | 1 ms | 256 KB |
06_04.in | AC | 1 ms | 256 KB |
07_04.in | AC | 1 ms | 256 KB |
08_08.in | AC | 1 ms | 256 KB |
09_04.in | AC | 1 ms | 256 KB |
10_03.in | AC | 1 ms | 256 KB |
11_09.in | AC | 1 ms | 256 KB |
12_02.in | AC | 1 ms | 256 KB |
13_07.in | AC | 1 ms | 256 KB |
14_07.in | AC | 1 ms | 256 KB |
15_04.in | AC | 1 ms | 256 KB |
16_10.in | AC | 1 ms | 256 KB |
17_10.in | AC | 1 ms | 256 KB |
18_10.in | AC | 1 ms | 256 KB |
19_10.in | AC | 1 ms | 256 KB |
20_10.in | AC | 1 ms | 256 KB |