CSES - KILO 2018 1/5 - Results
Submission details
Task:Gondola Groups
Sender:JeHugawa
Submission time:2018-09-06 17:58:23 +0300
Language:C++
Status:READY
Result:
Test results
testverdicttime
#1ACCEPTED0.01 sdetails
#2--details
#3--details
#4--details
#5--details
#6--details
#7--details
#8--details
#9--details
#10--details

Code

#include <iostream>
#include <vector> 
using namespace std;
int main(){
	unsigned long int n;
	cin >> n;
	vector <int> g;
	short int r;
	while (true){
		unsigned long int i;
		cin >> i;
		g.push_back(i);
		for (unsigned long int j =0;j < (g.size());j++) {
			if (g[j]%4 == 0){
				r = 1;
				for (unsigned long int k =0;k < (g.size());k++) { 
					if ( g[k] == g[j]-1 ||g[k] == g[j]-2 || g[k] == g[j]-3 ) {
						r++;
						if (r == 4){
							cout << (g[j]/4);
							exit(0);
						}
					}
				}
			}
		}
	}
}

Test details

Test 1

Verdict: ACCEPTED

input
100000
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

correct output
1

user output
1

Test 2

Verdict:

input
100000
1 2 3 5 6 7 9 10 11 13 14 15 1...

correct output
1

user output
(empty)

Test 3

Verdict:

input
100000
249553 268229 366316 220027 39...

correct output
36587

user output
(empty)

Test 4

Verdict:

input
100000
238080 22295 244014 65130 1590...

correct output
94109

user output
(empty)

Test 5

Verdict:

input
100000
132748 106846 171749 126956 39...

correct output
83369

user output
(empty)

Test 6

Verdict:

input
100000
382996 110914 120517 211562 19...

correct output
46365

user output
(empty)

Test 7

Verdict:

input
100000
340660 32656 68396 108969 1310...

correct output
36533

user output
(empty)

Test 8

Verdict:

input
100000
64338 77656 283623 21309 28555...

correct output
78202

user output
(empty)

Test 9

Verdict:

input
100000
351816 42200 304997 225056 236...

correct output
60906

user output
(empty)

Test 10

Verdict:

input
100000
399664 177574 51870 396247 392...

correct output
2591

user output
(empty)