Submission #1165069


Source Code Expand

#include<bits/stdc++.h>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) for(int i = 0; i < (b); i++)
#define all(a) (a).begin(), (a).end()
#define show(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
const int INF = 2000000000;
using namespace std;

vector<string> split(){
    string in,s;
    vector<string> ret;
    getline(cin,in);
    stringstream str(in);
    while(str >> s){
        ret.emplace_back(s);
    }
    return ret;
}

int main(){
    vector<string> v;
    v = split();

    if(v.size() < 3) goto END;
    while(true){
        int before = v.size();
        for(auto it = v.begin(); it != (v.end() - 2); it++){
            if(*it == "not" && *(it + 1) == "not" && *(it + 2) != "not"){
                it = v.erase(it);
                v.erase(it);
                break;
            }
        }
        if(before == v.size()) break;
    }
END:
    rep(i,v.size()){
        if(i) cout << ' ';
        cout << v[i];
    }
    cout << endl;
}

Submission Info

Submission Time
Task A - 二重否定除去法則
User noy72
Language C++14 (GCC 5.4.1)
Score 0
Code Size 1114 Byte
Status RE
Exec Time 110 ms
Memory 384 KB

Judge Result

Set Name All
Score / Max Score 0 / 100
Status
AC × 17
RE × 2
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 RE 101 ms 256 KB
scrambled_01.txt AC 1 ms 256 KB
scrambled_02.txt AC 1 ms 256 KB
scrambled_03.txt AC 1 ms 256 KB
scrambled_04.txt AC 1 ms 256 KB
scrambled_05.txt AC 13 ms 384 KB
scrambled_06.txt AC 2 ms 384 KB
scrambled_07.txt RE 110 ms 384 KB
scrambled_08.txt AC 12 ms 384 KB
scrambled_09.txt AC 1 ms 256 KB
scrambled_10.txt AC 1 ms 256 KB
scrambled_11.txt AC 1 ms 256 KB
scrambled_12.txt AC 2 ms 256 KB
scrambled_13.txt AC 2 ms 256 KB
scrambled_14.txt AC 2 ms 256 KB
scrambled_15.txt AC 2 ms 256 KB
scrambled_16.txt AC 2 ms 256 KB
scrambled_17.txt AC 2 ms 256 KB
scrambled_18.txt AC 2 ms 256 KB