CSES - Datatähti 2015 loppu - Results
Submission details
Task:Kartta
Sender:juusohe
Submission time:2015-01-29 17:07:51 +0200
Language:C++
Status:READY
Result:0
Feedback
groupverdictscore
#10
#20
#30
#40
Test results
testverdicttimegroup
#10.07 s1details
#20.10 s2details
#30.00 s3details
#40.00 s4details

Code

#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <utility>
#include <string>

using namespace std;

int main() {
	
	cin.sync_with_stdio(false);
	
	long long w = 0;
	long long h = 0;
	long long max = 0;
	
	cin >> w;
	cin >> h;
	cin >> max;

	vector< vector<long long> > ruudukko;
	
	vector<bool> kalvot;
	
	kalvot.push_back(true);
	
	vector<long long> rivi;
	
	for (long long i = 0; i < w; i++) {
		for (long long j = 0; j < h; j++) {
			long long x;
			cin >> x;
			rivi.push_back(x);
		}
		ruudukko.push_back(rivi);
		rivi.clear();
	}
	
	for (long long i = 0; i < w; i++) {
		for (long long j = 0; j < h; j++)
			cout << 'V';
		cout << '\n';
	}
	
	long long tulostettu = 0;
	
	for (long long k = 1; k <= max; k++) {
		bool kannattaa_tulostaa = false;
		string kalvo;
		for (long long i = 0; i < w; i++) {
			for (long long j = 0; j < h; j++) {
				if (ruudukko[i][j] == k) {
					kannattaa_tulostaa = true;
					kalvo += 'S';
				} else
					kalvo += 'L';
			}
			kalvo += '\n';
		}
		if (kannattaa_tulostaa) {
			cout << kalvo;
			tulostettu++;
		}
		kalvot.push_back(kannattaa_tulostaa);
	}

	for (; tulostettu < 39; tulostettu++) {
		for (long long i = 0; i < w; i++) {
			for (long long j = 0; j < h; j++)
				cout << 'V';
			cout << '\n';
		}
	}
	
	for (long long k = 1; k <= max; k++) {
		cout << k << ' ';
		for (long long l = 1; l <= k; l++) {
			if (kalvot[l-1] == true) {
				cout << l << ' ';
			}
		}
		cout << '\n';
	}
	
}

Test details

Test 1

Group: 1

Verdict:

input
100 100 40
40 11 38 24 5 31 40 10 17 33 1...

correct output
(empty)

user output
VVVVVVVVVVVVVVVVVVVVVVVVVVVVVV...

Test 2

Group: 2

Verdict:

input
100 100 200
200 71 185 86 113 84 170 60 17...

correct output
(empty)

user output
VVVVVVVVVVVVVVVVVVVVVVVVVVVVVV...

Test 3

Group: 3

Verdict:

input
100 100 1000
824 172 828 721 509 73 437 530...

correct output
(empty)

user output
(empty)

Test 4

Group: 4

Verdict:

input
100 100 10000
7110 9439 3392 1630 368 8481 1...

correct output
(empty)

user output
(empty)