Code Submission Evaluation System Login

HIIT Open 2018

Start:2018-05-26 11:00:00
End:2018-05-26 16:00:00
 

Tasks | Messages | Scoreboard | Statistics


CSES - HIIT Open 2018 - Results
History
2018-05-26 11:16:14
Task:Alien Invasion
Sender:KnowYourArchitecture
Submission time:2018-05-26 11:16:14
Language:C++
Status:READY
Result:ACCEPTED

Test results

testverdicttime (s)
#1ACCEPTED0.01 / 1.00details
#2ACCEPTED0.01 / 1.00details
#3ACCEPTED0.02 / 1.00details
#4ACCEPTED0.01 / 1.00details
#5ACCEPTED0.01 / 1.00details
#6ACCEPTED0.01 / 1.00details
#7ACCEPTED0.01 / 1.00details
#8ACCEPTED0.01 / 1.00details
#9ACCEPTED0.01 / 1.00details
#10ACCEPTED0.01 / 1.00details
#11ACCEPTED0.02 / 1.00details
#12ACCEPTED0.01 / 1.00details
#13ACCEPTED0.01 / 1.00details
#14ACCEPTED0.01 / 1.00details
#15ACCEPTED0.02 / 1.00details
#16ACCEPTED0.01 / 1.00details
#17ACCEPTED0.02 / 1.00details
#18ACCEPTED0.01 / 1.00details
#19ACCEPTED0.01 / 1.00details
#20ACCEPTED0.01 / 1.00details
#21ACCEPTED0.01 / 1.00details
#22ACCEPTED0.01 / 1.00details

Code

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef __int128 lll;
/*
lll powmod(lll a, lll p, lll mod) {
	if(p==0) return 1;
		if(p%2==0) {
			a=powmod(a,p/2,mod);
			return (a*a)%mod;
		}
	}
	return (a*powmod(a,p-1,mod))%mod);
}

void step(ll&x, ll n, ll c){x=(lll)((lll)x*(lll)x+(lll)c)%n;}
void rFactor(ll n, map<ll, ll>& r) {
	while(n%2==0) {
		n/=2;r[2]++;
	}
	if(n==1) return;
	if(isPrime(n))r[n]++;
	else {
		while(1){
			ll x=rand()%n;ll y=x;
			ll c=rand()%n;
			for(ll i=0;i*i<=n;i++){
				step(x,n,c);step(x,n,c);step(y,n,c);
				ll g=__gcd(max(x,y)-min(x,y),n);
				if(g==n)break;
				else if(g>1) {
					rFactor(n/g, r);
					rFactor(g,r);
					return;
				}
			}
		}
	}
}

map<ll,ll> factor(ll n){
	map<ll,ll> ret;
	if(n>1) rFactor(n,ret);
	return ret;
}
*/
bool test(ll a) {
	ll b = (ll)sqrt(a) - 10000;
	if (b<0) b = 0;
	ll c = b + 20000;
	for (ll i = b; i < c; i++) {
		if (i * i == a) return true;
	}
	return false;
}
int main(){
	ll a;
	cin>>a;
	if (!test(a)) {
		cout << "even\n";
	} else {
		cout << "odd\n";
	}
}

Test details

Test 1

Verdict: ACCEPTED

input
1
view   save

correct output
odd
view   save

user output
odd
view   save

Test 2

Verdict: ACCEPTED

input
2
view   save

correct output
even
view   save

user output
even
view   save

Test 3

Verdict: ACCEPTED

input
3
view   save

correct output
even
view   save

user output
even
view   save

Test 4

Verdict: ACCEPTED

input
4
view   save

correct output
odd
view   save

user output
odd
view   save

Test 5

Verdict: ACCEPTED

input
5
view   save

correct output
even
view   save

user output
even
view   save

Test 6

Verdict: ACCEPTED

input
6
view   save

correct output
even
view   save

user output
even
view   save

Test 7

Verdict: ACCEPTED

input
7
view   save

correct output
even
view   save

user output
even
view   save

Test 8

Verdict: ACCEPTED

input
8
view   save

correct output
even
view   save

user output
even
view   save

Test 9

Verdict: ACCEPTED

input
9
view   save

correct output
odd
view   save

user output
odd
view   save

Test 10

Verdict: ACCEPTED

input
10
view   save

correct output
even
view   save

user output
even
view   save

Test 11

Verdict: ACCEPTED

input
11
view   save

correct output
even
view   save

user output
even
view   save

Test 12

Verdict: ACCEPTED

input
12
view   save

correct output
even
view   save

user output
even
view   save

Test 13

Verdict: ACCEPTED

input
13
view   save

correct output
even
view   save

user output
even
view   save

Test 14

Verdict: ACCEPTED

input
14
view   save

correct output
even
view   save

user output
even
view   save

Test 15

Verdict: ACCEPTED

input
15
view   save

correct output
even
view   save

user output
even
view   save

Test 16

Verdict: ACCEPTED

input
16
view   save

correct output
odd
view   save

user output
odd
view   save

Test 17

Verdict: ACCEPTED

input
17
view   save

correct output
even
view   save

user output
even
view   save

Test 18

Verdict: ACCEPTED

input
18
view   save

correct output
even
view   save

user output
even
view   save

Test 19

Verdict: ACCEPTED

input
19
view   save

correct output
even
view   save

user output
even
view   save

Test 20

Verdict: ACCEPTED

input
999999874000003969
view   save

correct output
odd
view   save

user output
odd
view   save

Test 21

Verdict: ACCEPTED

input
999999999999999989
view   save

correct output
even
view   save

user output
even
view   save

Test 22

Verdict: ACCEPTED

input
1000000000000000000
view   save

correct output
odd
view   save

user output
odd
view   save