Code Submission Evaluation System Login

NOI 2019 Open

Start:N/A
End:N/A
 

Tasks | Scoreboard | Statistics


CSES - NOI 2019 Open - Results
History
After contest8
4:59:088
4:48:338
4:47:528
4:44:468
4:38:220
4:33:150
4:31:250
4:30:320
4:30:030
4:23:370
4:21:560
Task:Thieves and Prisons
Sender:Jatana
Submission time:2019-03-09 23:56:14
Language:C++
Status:READY
Score:8

Feedback

groupverdictscore
#1ACCEPTED8
#2WRONG ANSWER0
#3WRONG ANSWER0
#4WRONG ANSWER0
#5WRONG ANSWER0

Test results

testverdicttime (s)group
#1ACCEPTED0.01 / 1.002, 4, 5details
#2ACCEPTED0.02 / 1.002, 4, 5details
#3ACCEPTED0.02 / 1.002, 4, 5details
#4ACCEPTED0.02 / 1.002, 4, 5details
#5ACCEPTED0.02 / 1.002, 4, 5details
#6ACCEPTED0.01 / 1.004, 5details
#7ACCEPTED0.02 / 1.004, 5details
#8ACCEPTED0.02 / 1.004, 5details
#9ACCEPTED0.02 / 1.001, 3, 4, 5details
#10ACCEPTED0.02 / 1.001, 3, 4, 5details
#11ACCEPTED0.02 / 1.001, 3, 4, 5details
#12ACCEPTED0.02 / 1.001, 3, 4, 5details
#13ACCEPTED0.02 / 1.001, 3, 4, 5details
#14ACCEPTED0.02 / 1.001, 3, 4, 5details
#15ACCEPTED0.02 / 1.001, 3, 4, 5details
#16ACCEPTED0.02 / 1.001, 3, 4, 5details
#17ACCEPTED0.02 / 1.001, 2, 3, 4, 5details
#18ACCEPTED0.01 / 1.001, 3, 4, 5details
#19WRONG ANSWER0.07 / 1.002, 5details
#20ACCEPTED0.17 / 1.002, 5details
#21ACCEPTED0.16 / 1.002, 5details
#22ACCEPTED0.17 / 1.005details
#23ACCEPTED0.12 / 1.005details
#24WRONG ANSWER0.02 / 1.003, 4, 5details
#25WRONG ANSWER0.02 / 1.003, 4, 5details
#26WRONG ANSWER0.03 / 1.003, 4, 5details
#27WRONG ANSWER0.02 / 1.003, 4, 5details
#28WRONG ANSWER0.02 / 1.004, 5details
#29WRONG ANSWER0.03 / 1.004, 5details
#30WRONG ANSWER0.03 / 1.004, 5details
#31WRONG ANSWER0.01 / 1.004, 5details
#32WRONG ANSWER0.02 / 1.002, 4, 5details
#33WRONG ANSWER0.02 / 1.002, 4, 5details
#34WRONG ANSWER0.01 / 1.002, 4, 5details
#35WRONG ANSWER0.01 / 1.002, 4, 5details
#36WRONG ANSWER0.10 / 1.003, 5details
#37WRONG ANSWER0.10 / 1.003, 5details
#38WRONG ANSWER0.10 / 1.003, 5details
#39WRONG ANSWER0.11 / 1.003, 5details
#40WRONG ANSWER0.10 / 1.005details
#41WRONG ANSWER0.09 / 1.005details
#42WRONG ANSWER0.11 / 1.005details
#43WRONG ANSWER0.10 / 1.005details
#44WRONG ANSWER0.09 / 1.002, 5details
#45WRONG ANSWER0.09 / 1.002, 5details
#46WRONG ANSWER0.10 / 1.002, 5details
#47WRONG ANSWER0.10 / 1.002, 5details

Compiler report

input/code.cpp: In instantiation of 'void fast_print(const std::vector<_Tp>&) [with T = int]':
input/code.cpp:244:12:   required from 'std::ostream& operator,(std::ostream&, const T&) [with T = std::vector<int>; std::ostream = std::basic_ostream<char>]'
input/code.cpp:341:11:   required from here
input/code.cpp:181:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 1; i < v.size(); i++) {
input/code.cpp: In function 'void fast_scan(int&)':
input/code.cpp:133:31: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
 void fast_scan(int &x) { scanf("%d", &x); }
                          ~~~~~^~~~~~~~~~
input/code.cpp: In function 'void fast_scan(long long int&)':
input/code.cpp:134:37: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
 void fast_scan(long long &x) { scanf("%lld", &x); }

Code

/*
                                                                                                     
                                             `-:://:::-                                             
                                           `//:-------:/:`                                          
                                          .+:--.......--:+`                                         
                                         `+:--..`````..--//`                                        
                                         .o:--..`` ``..--:o`                                        
                                         .o:--...```..---+/`                                        
                                       `/y+o/---....---:+o.                                         
                                   `...````-os+/:---:/+o/--.`                                       
              `-/+++++/:.      `...`       :h+d+oooo+/+-`   ...                                     
            `/++//:::://++-`....`         -.`//````````:`     `..`                                  
           `o+/::------://o/`           `-` -.          -`       `..`                               
 `---.-o/:./o/::-..``..-ЗАПУСКАЕМ      ..  ..            -`        `...       ``..``                
  `....o+:-++/:--.```..-://s.        `-`  .-              -`          `-o: .-//::::/:-`             
          `:s+/:--....-::/+s-`      .-   `-                -`           -///:--------:/:`           
           ./s+//:::::://oo-``..НЕЙРОННУЮ: СЕТЬ:::::::-`РАБОТЯГИ        `+:--........--:/`          
            .:ooo+++++osso-`    `.:-...`/` ./::-------:/:`   -`         :+--..``````.--:+:...-+:-`  
             `.-/+++++/+-.-`    -.   ``:so:/:--.......--:+`  `-```````o+/+--..`````..--:o/-..:s+:.  
                 ```````:``.. `-`     -` `+:--..`````..--/+-.../.`````..-o:--.......---/o.    `     
                        `:  `:-      -.  .o:--..`` ``..--:o`   `-`      `:o+:--------:+o-`          
                         `-`-...    ..   .o/--...```..--:+/`    `-`     `oy/so/////++o/.`           
                          -/`  `-` `- ``+s/o/:---...---:++.      `-`   .-../d://///:-.`             
                `.---..``-..-    .-/..`````-oo+/:::::/+o+-        `-``-`  `-.  ````                 
             `:++++/+++++-  ..``.-/:`      /y-:/++o++/:.`..`       ./.   `-                         
            -++/::::::://+/..:-``:` ..   `-.`  ```.```    `..`   `..`-` `-                          
       ``  -o//:--....-::/++` -.-`   `-`.-`                 `..`..`  `-.-                           
  -----ss+:++/:--.```..-://s.  /.     `::                    `-:.     ./`                           
  `````/:..+o/::-..``.--:/+s. ..-`   `-``-`                 ..` `-`  `-`-`                          
          `-s+/::-----::/+oo---``-` ..    .:-    ```      .-`     .-.-  `-`                         
           `:oo+//::://+os/..:`..-/:`      :y.-:::::::.`.-`        ./-`  `-`                        
            `./+oooooooo+/.`-    .-:...`.. .//:-------://`        `- `..` `:.                       
              ``.-::::-.``-/`  `-` `-  `oo:+:--.......--:/`      `-    `.:--h.``..```               
                          -.-`.-    .-   `+:--..`````..--//`    `-       /s-//::::::::.             
                         -` `/-      ..  .o:--..`` ``..--:o.```.-        `//:--------://`           
                        -` .-`.-`     -.`-o/--...```..--:+/.``-:....``:-.+:--....`...--:+`          
                       ..`-.   `-.   ``:os:o/:---...---:++.  `-     ``///+:-..``````.--:+-````-.`   
              `.:///////.-`      .:-..` -``-+o+/:::::/+o/.  `-         `:+:-..`````..--:o/:--/ys+-  
            `-++///////+o/. ``....`-.    :` `.:++++++/:.`  .-           -o/---......---/o.   `.`    
           `++//:-----::/+o:..`     .-`   :    ```````    .-           `+so+:--------:++-`          
  `````:-``:o/::-..`..--:/+o`         -.  `-             .-          `../../+o+////+o+:.`           
  -----syo/o+/:--.```..-://s.          .-` `-           .-        `...     ``-:////:-``             
       .` `/s//:--....-::/+s.            -. `-`        .-       `..`                                
           .+o+/:::--:://+s/-..`          .::+y  ```  .-     `..`                                   
            ./oo++////+oso-`   `....       :y-+:::::::/`   ...                                      
             `.:+oooooo/-`         `....-. .//:-------:/:-.`                                        
                ``...``                 /+:+:--.......--:+`                                         
                                         `+:--..`````..--//`                                        
                                         .o:--..`` ``..--:o`                                        
                                         .+/--...```..--:+/`                                        
                                         `-o/:---...---:++.                                         
                                          `-+o+/:---:/+o/.                                          
                                            `.:+oooo+/-.`                                           
                                               ``````                                               
*/

#ifdef aimbot
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
#endif

#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <map>
#include <set>
#include <queue>
#include <ostream>
#include <istream>
#include <typeinfo>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <cassert>
#include <limits>
#include <fstream>
#include <array>
#include <list>
#include <bitset>
#include <functional>
#include <random>
#include <cstring>
#include <chrono>

#define random escape__from__random__aetuhoetnuhshe
#define mt make_tuple
#define x first
#define y second
#define pb push_back
#define ppb pop_back
#define mp make_pair
#define umap unordered_map
#define uset unordered_set
#define elif else if
#define len(v) ((int)v.size())
#define f(i, n) for (int i = 0; i < (n); i++)
#define rof(i, n) for (int i = ((n) - 1); i >= 0; i--) 
#define apply(v, act) for (auto &x : v) { act; }
#define log(args...) {string s = #args;deque<string> deq;\
string buf = "";int bal = 0;for (char c : s) {\
if (c == '(' || c == '[' || c == '{') {bal++;\
} else if (c == ')' || c == ']' || c == '}') {\
bal--;} else {if (bal == 0) {if (c == ',') {\
deq.pb(buf);buf = "";} else {if (c != ' ') {\
buf += c;}}}}}if (!buf.empty()) {deq.pb(buf);}\
smart_io::precall_print();smart_io::_print(deq, args);}

#define print    \
smart_io::precall_print(); \
cout,

#define scan cin,

#ifdef fast_allocator
const int MAXMEM = 200 * 1000 * 1024;
char _memory[MAXMEM];
size_t _ptr = 0;
void* operator new(size_t _x) { _ptr += _x; assert(_ptr < MAXMEM); return _memory + _ptr - _x; }
void operator delete (void*) noexcept {}
#endif

using namespace std;

char string_in_buffer[(int)260];


void fast_scan(int &x) { scanf("%d", &x); }
void fast_scan(long long &x) { scanf("%lld", &x); }
void fast_scan(unsigned long long &x) { scanf("%llu", &x); }
void fast_scan(double &x) { scanf("%lf", &x); }
void fast_scan(long double &x) { scanf("%Lf", &x); }
void fast_scan(char &x) { 
	scanf("%c", &x); 
	if (x == '\n') {
		fast_scan(x);
	}
}
void fast_scan(string &x) {
	scanf("%s", string_in_buffer);
	x = string(string_in_buffer);
}

template<class TFirst, class TSecond>
void fast_scan(pair<TFirst, TSecond> &p) {
	fast_scan(p.first);
	fast_scan(p.second);
}

template <class T>
void fast_scan(vector<T> &v) {
	for (auto &x : v) fast_scan(x);
}

void fast_print(const int &x) { printf("%d", x); }
void fast_print(const unsigned int &x) { printf("%u", x); }
void fast_print(const long long &x) { printf("%lld", x); }
void fast_print(const unsigned long long &x) { printf("%llu", x); }
void fast_print(const double &x) { printf("%.15lf", x); }
void fast_print(const long double &x) { printf("%.15Lf", x); }
void fast_print(const char &x) { printf("%c", x); };
void fast_print(const string &x) { printf("%s", x.c_str());}
void fast_print(const char v[]) { fast_print((string)v); }

template<class TFirst, class TSecond>
void fast_print(const pair<TFirst, TSecond> &p) {
	fast_print(p.first);
	fast_print(' ');
	fast_print(p.second);
}

template <class T>
void fast_print(const vector<T> &v) {
	if (v.empty()) return;
	fast_print(v[0]);
	for (int i = 1; i < v.size(); i++) {
		fast_print(' ');
		fast_print(v[i]);
	}
}

template <class T>
void fast_print(const vector<vector<T>> &v) {
	if (v.empty()) return;
	fast_print(v[0]);
	for (int i = 1; i < v.size(); i++) {
		fast_print('\n');
		fast_print(v[i]);
	}
}

template <class T>
void fast_print(const T &v) {
	for (const auto &x : v) {
		fast_print(x);
		fast_print(' ');
	}
}


using namespace std;


namespace smart_io {
	string print_start = "";
	string sep = " ";
	bool first_print = false;

	void precall_print() {
		fast_print(print_start);
		print_start = "\n";
		first_print = true;
	}

	void _print(deque<string>) {}
	template<class T, class... Args>
	void _print(deque<string> names, T elem, Args... args) {
		if (!first_print) {
			fast_print("\n");
		} else {
			first_print = false;
		}
		fast_print(names.front());
		fast_print(" = ");
		fast_print(elem);
		names.pop_front();
		_print(names, args...);
	}
} //namespace smart_io


template <class T>
ostream &operator,(ostream &os, const T &object) {
	if (!smart_io::first_print) {
		fast_print(smart_io::sep);
	} else {
		smart_io::first_print = false;
	}
	fast_print(object);
	return os;
}

template <class T>
istream &operator,(istream &is, T &object) {
	fast_scan(object);
	return is;
}

namespace random {
	using namespace std::chrono;
	mt19937 rng(duration_cast< milliseconds >(
		system_clock::now().time_since_epoch()
	).count());
	uniform_real_distribution<> prob_dist(0.0, 1.0);
};

namespace typedefs {
	typedef long long ll;
	typedef unsigned long long ull;
	typedef pair<int, int> pii;
	typedef long double ld;
}

namespace numbers_operation {
	template<class T>
	T floor_mod(T a, T b) {
		if (a >= 0 && b >= 0) return a % b;
		if (a <= 0 && b <= 0) return a % b;
		return abs(b) - (abs(a) % abs(b));
	}
}

using namespace numbers_operation;
using namespace typedefs;
using namespace random;

int n, k, m;

vector<int> R, up;
vector<int> suff;
vector<pair<string, int>> qs;
int get_right(int i) {
	if (up[i] == i) return i;
	return up[i] = get_right(up[i]);
}

bool check(vector<int> p) {
	vector<set<int>> prisons(k + 1);
	set<int> free;
	for (int i = 1; i <= n; i++) {
		free.insert(i);
	}
	for (int i = 0; i < m; i++) {
		int id = p[i];
		if (id > k) return false;
		if (qs[i].x == "C") {
			if (!free.count(qs[i].y)) return false;
			free.erase(qs[i].y);
			prisons[id].insert(qs[i].y);
		} else {
			if (!free.count(qs[i].y)) return false;
			if (prisons[id].empty()) return false;
			for (int x : prisons[id]) {
				free.insert(x);
			}
			prisons[id].clear();
		}
	}
	return true;
}

signed main(signed argc, char *argv[]) {
	scan n, k, m;
	vector<int> caught(n + 1, -1e9);
	set<int> free;
	for (int i = 1; i <= n; i++) {
		free.insert(i);
	}
	qs.resize(m);
	scan qs;
	vector<vector<int>> where(n + 1);
	suff.resize(m, -1);
	R.resize(m + 1);
	R[m] = m;
	if (m <= 12) {
		for (int mask = 0; mask < (1 << m); mask++) {
			vector<int> rez;
			f(j, m) {
				if ((1 << j) & mask) {
					rez.pb(1);
				} else {
					rez.pb(2);
				}
			}
			if (check(rez)) {
				print rez;
				return 0;
			}
		}
		print "IMPOSSIBLE";
		return 0;
	}
	rof(i, m) {
		if (qs[i].x == "O") {
			R[i] = i;
		} else {
			R[i] = R[i + 1];
		}
	}
	up = R;
	
	for (int i = 0; i < m; i++) {
		where[qs[i].y].pb(i);
	}

	vector<vector<pii>> end(m);
	for (int i = 1; i <= n; i++) {
		for (int j = 0; j < len(where[i]) - 1; j++) {
			int a = where[i][j];
			int b = where[i][j + 1];
			if (qs[a].x == "C") {
				end[b].emplace_back(a, i);
			}
		}
	}
	for (int i = 0; i < m; i++) {
		sort(end[i].begin(), end[i].end());
		for (pii p : end[i]) {
			bool found = false;
			for (int j = p.x + 1; j < i; j = get_right(j + 1)) {
				if (qs[j].x == "O") {
					if (suff[j] == -1) {
						int valid = p.y;
						suff[p.x] = suff[j] = valid;
						up[j] = j + 1;
						found = true;
						break;
					}
				}
			}
			if (!found) {
				int j = R[p.x];
				if (j >= i) {
					print "IMPOSSIBLE";
					return 0;
				} else {
					suff[p.x] = suff[j];
				}
			}
		}
	}
	f(i, m) {
		if (suff[i] == -1) {
			if (qs[i].x == "C") {
				suff[i] = 1;
			} else {
				print "IMPOSSIBLE";
				return 0;
			}
		}
	}
	if (check(suff)) {
		print suff;
	} else {
		print "IMPOSSIBLE";
	}
}

Test details

Test 1

Group: 2, 4, 5

Verdict: ACCEPTED

input
1 1 1
C 1

view   save

correct output


view   save

user output
1

view   save

Test 2

Group: 2, 4, 5

Verdict: ACCEPTED

input
1 1 1
O 1

view   save

correct output
IMPOSSIBLE

view   save

user output
IMPOSSIBLE

view   save

Test 3

Group: 2, 4, 5

Verdict: ACCEPTED

input
1 1 2
C 1
C 1

view   save

correct output
IMPOSSIBLE

view   save

user output
IMPOSSIBLE

view   save

Test 4

Group: 2, 4, 5

Verdict: ACCEPTED

input
1 1 2
C 1
O 1

view   save

correct output
IMPOSSIBLE

view   save

user output
IMPOSSIBLE

view   save

Test 5

Group: 2, 4, 5

Verdict: ACCEPTED

input
1 1 2
O 1
C 1

view   save

correct output
IMPOSSIBLE

view   save

user output
IMPOSSIBLE

view   save

Test 6

Group: 4, 5

Verdict: ACCEPTED

input
2 1 2
C 1
C 2

view   save

correct output
1 1 

view   save

user output
1 1

view   save

Test 7

Group: 4, 5

Verdict: ACCEPTED

input
2 1 2
C 1
O 1

view   save

correct output
IMPOSSIBLE

view   save

user output
IMPOSSIBLE

view   save

Test 8

Group: 4, 5

Verdict: ACCEPTED

input
2 1 2
C 1
O 2

view   save

correct output
1 1 

view   save

user output
1 1

view   save

Test 9

Group: 1, 3, 4, 5

Verdict: ACCEPTED

input
3 2 5
C 1
C 2
O 3
C 1
...
view   save

correct output
1 1 1 1 1 

view   save

user output
2 2 2 2 2

view   save

Test 10

Group: 1, 3, 4, 5

Verdict: ACCEPTED

input
3 2 5
C 1
C 2
O 3
O 3
...
view   save

correct output
2 1 2 1 1 

view   save

user output
1 2 1 2 2

view   save

Test 11

Group: 1, 3, 4, 5

Verdict: ACCEPTED

input
3 2 5
C 1
C 2
O 3
O 1
...
view   save

correct output
2 1 2 1 1 

view   save

user output
1 2 1 2 2

view   save

Test 12

Group: 1, 3, 4, 5

Verdict: ACCEPTED

input
3 2 5
C 1
C 2
O 1
O 3
...
view   save

correct output
IMPOSSIBLE

view   save

user output
IMPOSSIBLE

view   save

Test 13

Group: 1, 3, 4, 5

Verdict: ACCEPTED

input
3 2 4
C 1
O 2
C 1
O 3
view   save

correct output
1 1 1 1 

view   save

user output
2 2 2 2

view   save

Test 14

Group: 1, 3, 4, 5

Verdict: ACCEPTED

input
3 2 4
C 1
O 2
C 2
O 1
view   save

correct output
1 1 1 1 

view   save

user output
2 2 2 2

view   save

Test 15

Group: 1, 3, 4, 5

Verdict: ACCEPTED

input
3 2 3
C 1
C 2
C 3

view   save

correct output
1 1 1 

view   save

user output
2 2 2

view   save

Test 16

Group: 1, 3, 4, 5

Verdict: ACCEPTED

input
3 2 3
O 1
C 2
C 3

view   save

correct output
IMPOSSIBLE

view   save

user output
IMPOSSIBLE

view   save

Test 17

Group: 1, 2, 3, 4, 5

Verdict: ACCEPTED

input
2 2 7
C 1
O 2
O 2
O 2
...
view   save

correct output
IMPOSSIBLE

view   save

user output
IMPOSSIBLE

view   save

Test 18

Group: 1, 3, 4, 5

Verdict: ACCEPTED

input
4 2 5
C 2
O 3
C 1
O 4
...
view   save

correct output
1 1 1 1 1 

view   save

user output
2 2 2 2 2

view   save

Test 19

Group: 2, 5

Verdict: WRONG ANSWER

input
100000 100000 100000
C 1
C 2
C 3
C 4
...
view   save

correct output
50000 49999 49998 49997 49996 ...
view   save

user output
IMPOSSIBLE

view   save

Test 20

Group: 2, 5

Verdict: ACCEPTED

input
100000 100000 100000
C 1
C 2
C 3
C 4
...
view   save

correct output
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
view   save

user output
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
view   save

Test 21

Group: 2, 5

Verdict: ACCEPTED

input
100000 100000 100000
C 1
C 2
C 3
C 4
...
view   save

correct output
20000 20000 20000 20000 20000 ...
view   save

user output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...
view   save

Test 22

Group: 5

Verdict: ACCEPTED

input
100000 100 100000
C 1
C 2
C 3
C 4
...
view   save

correct output
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
view   save

user output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...
view   save

Test 23

Group: 5

Verdict: ACCEPTED

input
100000 99 100000
C 1
C 2
C 3
C 4
...
view   save

correct output
IMPOSSIBLE

view   save

user output
IMPOSSIBLE

view   save

Test 24

Group: 3, 4, 5

Verdict: WRONG ANSWER

input
500 2 500
C 384
O 62
C 387
O 473
...
view   save

correct output
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
view   save

user output
IMPOSSIBLE

view   save

Test 25

Group: 3, 4, 5

Verdict: WRONG ANSWER

input
500 2 500
C 384
O 62
C 387
O 473
...
view   save

correct output
1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 ...
view   save

user output
IMPOSSIBLE

view   save

Test 26

Group: 3, 4, 5

Verdict: WRONG ANSWER

input
500 2 500
C 384
O 62
C 387
O 473
...
view   save

correct output
1 1 1 1 1 1 1 1 1 1 1 1 2 1 2 ...
view   save

user output
IMPOSSIBLE

view   save

Test 27

Group: 3, 4, 5

Verdict: WRONG ANSWER

input
500 2 500
C 384
O 62
C 387
C 473
...
view   save

correct output
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
view   save

user output
IMPOSSIBLE

view   save

Test 28

Group: 4, 5

Verdict: WRONG ANSWER

input
500 250 500
C 384
O 62
C 387
O 473
...
view   save

correct output
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
view   save

user output
IMPOSSIBLE

view   save

Test 29

Group: 4, 5

Verdict: WRONG ANSWER

input
500 250 500
C 384
O 62
C 387
O 473
...
view   save

correct output
1 1 1 1 1 1 1 1 1 1 1 1 2 1 3 ...
view   save

user output
IMPOSSIBLE

view   save

Test 30

Group: 4, 5

Verdict: WRONG ANSWER

input
500 250 500
C 384
O 62
C 387
O 473
...
view   save

correct output
1 1 1 1 1 3 2 3 3 2 2 2 5 4 2 ...
view   save

user output
IMPOSSIBLE

view   save

Test 31

Group: 4, 5

Verdict: WRONG ANSWER

input
500 250 500
C 384
O 62
C 387
C 473
...
view   save

correct output
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
view   save

user output
IMPOSSIBLE

view   save

Test 32

Group: 2, 4, 5

Verdict: WRONG ANSWER

input
500 500 500
C 384
O 62
C 387
O 473
...
view   save

correct output
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
view   save

user output
IMPOSSIBLE

view   save

Test 33

Group: 2, 4, 5

Verdict: WRONG ANSWER

input
500 500 500
C 384
O 62
C 387
O 473
...
view   save

correct output
1 1 1 1 1 1 1 1 1 1 1 1 2 1 3 ...
view   save

user output
IMPOSSIBLE

view   save

Test 34

Group: 2, 4, 5

Verdict: WRONG ANSWER

input
500 500 500
C 384
O 62
C 387
O 473
...
view   save

correct output
1 1 1 1 2 1 3 3 3 2 2 2 2 4 5 ...
view   save

user output
IMPOSSIBLE

view   save

Test 35

Group: 2, 4, 5

Verdict: WRONG ANSWER

input
500 500 500
C 384
O 62
C 387
C 473
...
view   save

correct output
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
view   save

user output
IMPOSSIBLE

view   save

Test 36

Group: 3, 5

Verdict: WRONG ANSWER

input
100000 2 100000
C 89384
O 54062
C 85387
O 53318
...
view   save

correct output
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
view   save

user output
IMPOSSIBLE

view   save

Test 37

Group: 3, 5

Verdict: WRONG ANSWER

input
100000 2 100000
C 89384
O 54062
C 85387
O 53318
...
view   save

correct output
1 1 1 1 1 1 1 1 1 1 1 1 2 2 1 ...
view   save

user output
IMPOSSIBLE

view   save

Test 38

Group: 3, 5

Verdict: WRONG ANSWER

input
100000 2 100000
C 89384
O 54062
C 85387
O 53318
...
view   save

correct output
1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 ...
view   save

user output
IMPOSSIBLE

view   save

Test 39

Group: 3, 5

Verdict: WRONG ANSWER

input
100000 2 100000
C 89384
O 54062
C 85387
C 53318
...
view   save

correct output
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
view   save

user output
IMPOSSIBLE

view   save

Test 40

Group: 5

Verdict: WRONG ANSWER

input
100000 50000 100000
C 89384
O 54062
C 85387
O 53318
...
view   save

correct output
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
view   save

user output
IMPOSSIBLE

view   save

Test 41

Group: 5

Verdict: WRONG ANSWER

input
100000 50000 100000
C 89384
O 54062
C 85387
O 53318
...
view   save

correct output
1 1 1 1 1 1 1 1 1 1 1 1 3 2 1 ...
view   save

user output
IMPOSSIBLE

view   save

Test 42

Group: 5

Verdict: WRONG ANSWER

input
100000 50000 100000
C 89384
O 54062
C 85387
O 53318
...
view   save

correct output
1 1 1 1 1 3 2 3 3 3 3 3 3 4 5 ...
view   save

user output
IMPOSSIBLE

view   save

Test 43

Group: 5

Verdict: WRONG ANSWER

input
100000 50000 100000
C 89384
O 54062
C 85387
C 53318
...
view   save

correct output
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
view   save

user output
IMPOSSIBLE

view   save

Test 44

Group: 2, 5

Verdict: WRONG ANSWER

input
100000 100000 100000
C 89384
O 54062
C 85387
O 53318
...
view   save

correct output
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
view   save

user output
IMPOSSIBLE

view   save

Test 45

Group: 2, 5

Verdict: WRONG ANSWER

input
100000 100000 100000
C 89384
O 54062
C 85387
O 53318
...
view   save

correct output
1 1 1 1 1 1 1 1 1 1 1 1 3 2 1 ...
view   save

user output
IMPOSSIBLE

view   save

Test 46

Group: 2, 5

Verdict: WRONG ANSWER

input
100000 100000 100000
C 89384
O 54062
C 85387
O 53318
...
view   save

correct output
1 1 1 1 2 1 3 3 3 3 3 3 4 5 3 ...
view   save

user output
IMPOSSIBLE

view   save

Test 47

Group: 2, 5

Verdict: WRONG ANSWER

input
100000 100000 100000
C 89384
O 54062
C 85387
C 53318
...
view   save

correct output
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
view   save

user output
IMPOSSIBLE

view   save