Submission #00163
ソースコード
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 38 39 40 41 42 43 44 45 | #include<bits/stdc++.h> using namespace std; main(){ int i = 0,j; string sent; string word[10001]; bool flag = false ; getline(cin,sent); stringstream ss(sent); while (ss >> sent){ word[i] = sent; i++; } for (j=0;j<i-2;j++){ if (word[j] == "not" ){ if (word[j+1] == "not" ){ if (word[j+2] != "not" ){ word[j] = "" ; word[j+1] = "" ; } } } } for (j=0;j<i;j++){ if (word[j] != "" ){ if (flag == false ){ cout << word[j] ; flag = true ; } else { cout << " " << word[j]; } } else { cout << word[j]; } } cout << endl; return 0; } |
ステータス
項目 | データ |
---|---|
問題 | 0005 - 二重否定除去法則 |
ユーザー名 | TS |
投稿日時 | 2015-08-28 11:33:01 |
言語 | C++11 |
状態 | Wrong Answer |
得点 | 0 |
ソースコード長 | 667 Byte |
最大実行時間 | 27 ms |
最大メモリ使用量 | 968 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 0 / 20 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
scrambled_00.txt | AC | 18 ms | 732 KB |
1
|
scrambled_01.txt | AC | 20 ms | 656 KB |
1
|
scrambled_02.txt | AC | 24 ms | 716 KB |
1
|
scrambled_03.txt | AC | 21 ms | 768 KB |
1
|
scrambled_04.txt | AC | 27 ms | 696 KB |
1
|
scrambled_05.txt | WA | 19 ms | 752 KB |
1
|
scrambled_06.txt | AC | 17 ms | 792 KB |
1
|
scrambled_07.txt | WA | 25 ms | 832 KB |
1
|
scrambled_08.txt | WA | 21 ms | 868 KB |
1
|
scrambled_09.txt | AC | 23 ms | 904 KB |
1
|
scrambled_10.txt | AC | 21 ms | 932 KB |
1
|
scrambled_11.txt | AC | 23 ms | 968 KB |
1
|
scrambled_12.txt | AC | 18 ms | 744 KB |
1
|
scrambled_13.txt | AC | 16 ms | 780 KB |
1
|
scrambled_14.txt | AC | 23 ms | 816 KB |
1
|
scrambled_15.txt | AC | 23 ms | 856 KB |
1
|
scrambled_16.txt | AC | 21 ms | 896 KB |
1
|
scrambled_17.txt | AC | 13 ms | 932 KB |
1
|
scrambled_18.txt | AC | 21 ms | 840 KB |
1
|