Submission #00173


ソースコード

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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#include<bits/stdc++.h>
using namespace std;
main(){
int i = 0,j;
string sent;
string word[10001];
bool flag = false;
getline(cin,sent);
istringstream 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-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-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-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:49:20
言語 C++11
状態 Wrong Answer
得点 0
ソースコード長 1198 Byte
最大実行時間 21 ms
最大メモリ使用量 944 KB

セット

セット 得点 Cases
1 ALL 0 / 20 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
scrambled_00.txt AC 17 ms 732 KB
1
scrambled_01.txt AC 15 ms 656 KB
1
scrambled_02.txt AC 21 ms 712 KB
1
scrambled_03.txt AC 20 ms 764 KB
1
scrambled_04.txt AC 16 ms 816 KB
1
scrambled_05.txt WA 16 ms 872 KB
1
scrambled_06.txt AC 19 ms 904 KB
1
scrambled_07.txt WA 16 ms 812 KB
1
scrambled_08.txt WA 16 ms 844 KB
1
scrambled_09.txt AC 17 ms 880 KB
1
scrambled_10.txt AC 15 ms 784 KB
1
scrambled_11.txt AC 15 ms 688 KB
1
scrambled_12.txt AC 18 ms 728 KB
1
scrambled_13.txt AC 13 ms 772 KB
1
scrambled_14.txt AC 15 ms 804 KB
1
scrambled_15.txt AC 19 ms 832 KB
1
scrambled_16.txt AC 15 ms 872 KB
1
scrambled_17.txt AC 19 ms 912 KB
1
scrambled_18.txt AC 17 ms 944 KB
1