Submission #00181
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | #include<bits/stdc++.h> using namespace std; int main(){ char S[5000]; char kuu[] = " " ; string bun[5000]; char *tok; int sam=0; cin.getline(S, sizeof (S)); //cout << S << endl; tok = strtok (S,kuu); while (tok != NULL){ bun[sam] = tok; sam++; tok = strtok (NULL,kuu); } //cout << bun[2] << endl; for ( int i=0;i<sam;i++){ if (bun[i]== "not" && bun[i+1]== "not" ){ if (bun[i+2] != "not" ){ bun[i] = "**" ; bun[i+1] = "**" ; } } } for ( int i=0;i<sam+1;i++){ if (bun[i] != "**" ){ cout << bun[i]; if (i != sam){ cout << " " ; } } } cout << endl; } |
ステータス
項目 | データ |
---|---|
問題 | 0005 - 二重否定除去法則 |
ユーザー名 | のんのんもりた |
投稿日時 | 2015-08-28 11:56:29 |
言語 | C++11 |
状態 | Wrong Answer |
得点 | 0 |
ソースコード長 | 657 Byte |
最大実行時間 | 23 ms |
最大メモリ使用量 | 860 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 0 / 20 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
scrambled_00.txt | WA | 20 ms | 604 KB |
1
|
scrambled_01.txt | WA | 20 ms | 684 KB |
1
|
scrambled_02.txt | WA | 22 ms | 632 KB |
1
|
scrambled_03.txt | WA | 22 ms | 836 KB |
1
|
scrambled_04.txt | WA | 17 ms | 784 KB |
1
|
scrambled_05.txt | WA | 21 ms | 860 KB |
1
|
scrambled_06.txt | WA | 19 ms | 680 KB |
1
|
scrambled_07.txt | WA | 22 ms | 760 KB |
1
|
scrambled_08.txt | WA | 13 ms | 708 KB |
1
|
scrambled_09.txt | WA | 20 ms | 784 KB |
1
|
scrambled_10.txt | WA | 20 ms | 732 KB |
1
|
scrambled_11.txt | WA | 20 ms | 676 KB |
1
|
scrambled_12.txt | WA | 16 ms | 744 KB |
1
|
scrambled_13.txt | WA | 23 ms | 816 KB |
1
|
scrambled_14.txt | WA | 17 ms | 756 KB |
1
|
scrambled_15.txt | WA | 21 ms | 824 KB |
1
|
scrambled_16.txt | WA | 21 ms | 768 KB |
1
|
scrambled_17.txt | WA | 21 ms | 716 KB |
1
|
scrambled_18.txt | WA | 20 ms | 788 KB |
1
|