Submission #371143


Source Code Expand

#include <bits/stdc++.h>
using namespace std;
#define FOR(i,k,n) for(int i = (k); i < (n); i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) begin(a),end(a)
#define MS(m,v) memset(m,v,sizeof(m))
#define D10  fixed<<setprecision(10)
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int, int> P;
typedef long long ll;
const ll INF = 114514810;
const int MOD = 1000000007;
const double EPS = 1e-8;
const double PI = acos(-1.0);
struct edge
{
	int from, to, cost;
	bool operator < (const edge& e) const { return cost < e.cost; }
	bool operator >(const edge& e) const { return cost > e.cost; }
};
int dx[] = { -1, 0, 0, 1 }; int dy[] = { 0, -1, 1, 0 };
///*************************************************************************************///
///*************************************************************************************///
///*************************************************************************************///

int main()
{
	vs v;
	string s;
	while (cin >> s)
	{
		v.push_back(s);
	}
	while (v.back() != "not" && v.size()>2)
	{
		if (v[0] == "not"&&v[1] == "not")
		{
			v.erase(v.begin());
			v.erase(v.begin());
		}
	}
	REP(i, v.size())
	{
		cout << v[i] << (i == v.size() - 1 ? "\n" : " ");
	}
	return 0;
}

Submission Info

Submission Time
Task A - 二重否定除去法則
User amano
Language C++11 (GCC 4.9.2)
Score 0
Code Size 1283 Byte
Status TLE
Exec Time 2040 ms
Memory 936 KB

Judge Result

Set Name All
Score / Max Score 0 / 100
Status
AC × 9
TLE × 10
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 AC 25 ms 808 KB
scrambled_01.txt AC 24 ms 924 KB
scrambled_02.txt AC 23 ms 924 KB
scrambled_03.txt AC 24 ms 920 KB
scrambled_04.txt AC 24 ms 924 KB
scrambled_05.txt AC 29 ms 796 KB
scrambled_06.txt AC 24 ms 924 KB
scrambled_07.txt AC 30 ms 924 KB
scrambled_08.txt AC 31 ms 800 KB
scrambled_09.txt TLE 2030 ms 932 KB
scrambled_10.txt TLE 2031 ms 936 KB
scrambled_11.txt TLE 2032 ms 928 KB
scrambled_12.txt TLE 2033 ms 928 KB
scrambled_13.txt TLE 2033 ms 924 KB
scrambled_14.txt TLE 2040 ms 916 KB
scrambled_15.txt TLE 2032 ms 924 KB
scrambled_16.txt TLE 2030 ms 932 KB
scrambled_17.txt TLE 2033 ms 928 KB
scrambled_18.txt TLE 2040 ms 920 KB