Submission #6031190
Source Code Expand
#include<bits/stdc++.h> using namespace std; char a[5001]; int ans=0,k; int main() { gets(a); for(int i=0;i<strlen(a);i++) { if(a[i]=='n'&&a[i+1]=='o'&&a[i+2]=='t') { ans++; k=i+3; } } if(ans%2==1) puts(a); else { for(int j=k;j<=strlen(a);j++) { if(a[j]==' ') k++; else break; } for(int i=k;i<strlen(a);i++) { if(a[k]==' ') i++; cout<<a[i]; } } return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - 二重否定除去法則 |
User | luogu_bot3 |
Language | C++ (GCC 5.4.1) |
Score | 0 |
Code Size | 489 Byte |
Status | WA |
Exec Time | 2 ms |
Memory | 256 KB |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:7:5: 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:7:5: 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:7:11: warning: ‘char* gets(char*)’ is deprecated [-Wdeprecated-declarations] gets(a); ^ In file included from /usr/include/c++/5/cstdio:42:0, ...
Judge Result
Set Name | All | ||||
---|---|---|---|---|---|
Score / Max Score | 0 / 100 | ||||
Status |
|
Set Name | Test Cases |
---|---|
All | scrambled_00.txt, scrambled_01.txt, scrambled_02.txt, scrambled_03.txt, scrambled_04.txt, scrambled_05.txt, scrambled_06.txt, scrambled_07.txt, scrambled_08.txt, scrambled_09.txt, scrambled_10.txt, scrambled_11.txt, scrambled_12.txt, scrambled_13.txt, scrambled_14.txt, scrambled_15.txt, scrambled_16.txt, scrambled_17.txt, scrambled_18.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
scrambled_00.txt | WA | 1 ms | 256 KB |
scrambled_01.txt | WA | 1 ms | 256 KB |
scrambled_02.txt | AC | 1 ms | 256 KB |
scrambled_03.txt | WA | 1 ms | 256 KB |
scrambled_04.txt | WA | 1 ms | 256 KB |
scrambled_05.txt | WA | 1 ms | 256 KB |
scrambled_06.txt | AC | 1 ms | 256 KB |
scrambled_07.txt | WA | 1 ms | 256 KB |
scrambled_08.txt | WA | 1 ms | 256 KB |
scrambled_09.txt | WA | 2 ms | 256 KB |
scrambled_10.txt | WA | 1 ms | 256 KB |
scrambled_11.txt | WA | 1 ms | 256 KB |
scrambled_12.txt | WA | 1 ms | 256 KB |
scrambled_13.txt | WA | 1 ms | 256 KB |
scrambled_14.txt | WA | 1 ms | 256 KB |
scrambled_15.txt | WA | 1 ms | 256 KB |
scrambled_16.txt | WA | 1 ms | 256 KB |
scrambled_17.txt | WA | 1 ms | 256 KB |
scrambled_18.txt | WA | 1 ms | 256 KB |