| Task: | Bittipeli |
| Sender: | hello_world |
| Submission time: | 2015-10-03 01:21:21 +0300 |
| Language: | C++ |
| Status: | READY |
| Result: | 0 |
| subtask | verdict | score |
|---|---|---|
| #1 | WRONG ANSWER | 0 |
| #2 | RUNTIME ERROR | 0 |
| #3 | WRONG ANSWER | 0 |
| #4 | RUNTIME ERROR | 0 |
| test | verdict | time | subtask | |
|---|---|---|---|---|
| #1 | ACCEPTED | 0.06 s | 1 | details |
| #2 | WRONG ANSWER | 0.05 s | 1 | details |
| #3 | WRONG ANSWER | 0.05 s | 1 | details |
| #4 | WRONG ANSWER | 0.05 s | 1 | details |
| #5 | RUNTIME ERROR | 0.13 s | 1 | details |
| #6 | WRONG ANSWER | 0.05 s | 1 | details |
| #7 | WRONG ANSWER | 0.06 s | 1 | details |
| #8 | WRONG ANSWER | 0.06 s | 1 | details |
| #9 | RUNTIME ERROR | 0.13 s | 1 | details |
| #10 | WRONG ANSWER | 0.05 s | 1 | details |
| #11 | WRONG ANSWER | 0.06 s | 1 | details |
| #12 | WRONG ANSWER | 0.06 s | 1 | details |
| #13 | WRONG ANSWER | 0.05 s | 1 | details |
| #14 | WRONG ANSWER | 0.06 s | 1 | details |
| #15 | WRONG ANSWER | 0.04 s | 1 | details |
| #16 | WRONG ANSWER | 0.06 s | 1 | details |
| #17 | ACCEPTED | 0.05 s | 1 | details |
| #18 | WRONG ANSWER | 0.05 s | 1 | details |
| #19 | WRONG ANSWER | 0.05 s | 1 | details |
| #20 | ACCEPTED | 0.06 s | 1 | details |
| #21 | RUNTIME ERROR | 0.14 s | 2 | details |
| #22 | WRONG ANSWER | 0.06 s | 2 | details |
| #23 | WRONG ANSWER | 0.05 s | 2 | details |
| #24 | RUNTIME ERROR | 0.14 s | 2 | details |
| #25 | WRONG ANSWER | 0.06 s | 2 | details |
| #26 | RUNTIME ERROR | 0.13 s | 2 | details |
| #27 | WRONG ANSWER | 0.05 s | 2 | details |
| #28 | WRONG ANSWER | 0.05 s | 2 | details |
| #29 | WRONG ANSWER | 0.05 s | 2 | details |
| #30 | RUNTIME ERROR | 0.14 s | 2 | details |
| #31 | RUNTIME ERROR | 0.14 s | 2 | details |
| #32 | WRONG ANSWER | 0.06 s | 2 | details |
| #33 | RUNTIME ERROR | 0.14 s | 2 | details |
| #34 | WRONG ANSWER | 0.05 s | 2 | details |
| #35 | WRONG ANSWER | 0.06 s | 2 | details |
| #36 | WRONG ANSWER | 0.05 s | 2 | details |
| #37 | WRONG ANSWER | 0.06 s | 2 | details |
| #38 | WRONG ANSWER | 0.05 s | 2 | details |
| #39 | WRONG ANSWER | 0.05 s | 2 | details |
| #40 | WRONG ANSWER | 0.05 s | 2 | details |
| #41 | ACCEPTED | 0.05 s | 3 | details |
| #42 | WRONG ANSWER | 0.05 s | 3 | details |
| #43 | WRONG ANSWER | 0.06 s | 3 | details |
| #44 | WRONG ANSWER | 0.05 s | 3 | details |
| #45 | WRONG ANSWER | 0.06 s | 3 | details |
| #46 | WRONG ANSWER | 0.05 s | 3 | details |
| #47 | WRONG ANSWER | 0.06 s | 3 | details |
| #48 | WRONG ANSWER | 0.05 s | 3 | details |
| #49 | WRONG ANSWER | 0.03 s | 3 | details |
| #50 | RUNTIME ERROR | 0.14 s | 3 | details |
| #51 | WRONG ANSWER | 0.06 s | 3 | details |
| #52 | WRONG ANSWER | 0.06 s | 3 | details |
| #53 | WRONG ANSWER | 0.06 s | 3 | details |
| #54 | WRONG ANSWER | 0.06 s | 3 | details |
| #55 | WRONG ANSWER | 0.06 s | 3 | details |
| #56 | WRONG ANSWER | 0.05 s | 3 | details |
| #57 | WRONG ANSWER | 0.06 s | 3 | details |
| #58 | WRONG ANSWER | 0.05 s | 3 | details |
| #59 | WRONG ANSWER | 0.05 s | 3 | details |
| #60 | WRONG ANSWER | 0.06 s | 3 | details |
| #61 | RUNTIME ERROR | 0.14 s | 4 | details |
| #62 | WRONG ANSWER | 0.05 s | 4 | details |
| #63 | WRONG ANSWER | 0.05 s | 4 | details |
| #64 | WRONG ANSWER | 0.05 s | 4 | details |
| #65 | WRONG ANSWER | 0.05 s | 4 | details |
| #66 | WRONG ANSWER | 0.05 s | 4 | details |
| #67 | WRONG ANSWER | 0.06 s | 4 | details |
| #68 | RUNTIME ERROR | 0.13 s | 4 | details |
| #69 | WRONG ANSWER | 0.05 s | 4 | details |
| #70 | WRONG ANSWER | 0.05 s | 4 | details |
| #71 | WRONG ANSWER | 0.06 s | 4 | details |
| #72 | WRONG ANSWER | 0.05 s | 4 | details |
| #73 | WRONG ANSWER | 0.06 s | 4 | details |
| #74 | WRONG ANSWER | 0.05 s | 4 | details |
| #75 | WRONG ANSWER | 0.06 s | 4 | details |
| #76 | WRONG ANSWER | 0.06 s | 4 | details |
| #77 | WRONG ANSWER | 0.07 s | 4 | details |
| #78 | WRONG ANSWER | 0.06 s | 4 | details |
| #79 | WRONG ANSWER | 0.05 s | 4 | details |
| #80 | WRONG ANSWER | 0.05 s | 4 | details |
Compiler report
input/code.cpp: In function 'int main()':
input/code.cpp:87:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < length; i++){
^
input/code.cpp:90:45: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (cur_bit != ap->bit || (lastBits && i == length - 1)) {
^
input/code.cpp:93:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (i == length - 1) {
^
input/code.cpp:45:7: warning: unused variable 'bit' [-Wunused-variable]
char bit;
^
input/code.cpp:48:7: warning: unused variable 'last_bit' [-Wunused-variable]
bool last_bit;
^
input/code.cpp:77:28: warning: ignoring return value of 'char* fgets(char*, int, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
fgets(buffer, len, stdin);
^Code
#include <stdio.h>
#include <iostream>
#include <string>
#include <string.h>
#include <stdlib.h>
using namespace std;
struct Bits{
Bits *next;
Bits *last;
bool onlyOneBit;//true = vain yksi bitti, false = yli yksi bitti
bool bit; // bit == true == 1, bit == false == 0
unsigned int index;
};
struct Index{
unsigned int value;
Index *next;
};
Bits *temp, *temp2, *temp3;
bool lastBits = false;
bool lastBit = false;
bool completed = false;
void printBits(Bits *a);
bool deleteBits(Bits *a);
void addIndex(unsigned int index);
void printIndex();
void freeIndex();
void freeMemory(Bits *a);
Index *index_a = (Index *)malloc(sizeof(Index *));
Index *index_ap = index_a; //index ap on listan loppu ja index_a on listan alku
//bool init_index = true;
int main(void){
char bit;
bool cur_bit;
bool last_bit;
bool onlyOneBit;
index_ap->next = NULL;
//Bits *a = (Bits *)malloc(sizeof(Bits *));
Bits *a = (Bits *)malloc(sizeof(Bits *));
a->bit = (fgetc(stdin) == '1'); //otetaan ensimmäinen bit, jotta sitä ei pidä joka kerta tarkistaa while-lauseen for-lauseessa, tms, jne..
//(buffer[i] == '1')
if (feof(stdin)) {
cout << endl << "QAQ"; //vain yksi bit syötetty = yhtä ei voida poistaa = häviö
return 0;
}
a->next = NULL;
a->last = NULL;
a->index = 0;
Bits *ap = a;
onlyOneBit = true;
unsigned int len = 256;
unsigned int length;
char buffer[len];
while(!lastBit) {
//cout << "asdf";
fgets(buffer, len, stdin);
length = strlen(buffer);
if (buffer[length - 1] == '\n') {
buffer[length - 1] = buffer[length - 2];
//length--; //'poistetaan' '\n'
//length--;
lastBits = true;
//nyt voidaan poistaa myös ne Bits:it, joiden ap->last ja ap->next on NULL
}
//muodostetaan ihan ensimmäiseksi lista, sitten tehdään niistä pointersToBits
for (int i = 0; i < length; i++){
if (buffer[i] == '1') cur_bit = 1;
else cur_bit = 0;
if (cur_bit != ap->bit || (lastBits && i == length - 1)) {
if (lastBits) {
if (i == length - 1) {
lastBit = true;
//printBits(a);
//cout << "ekomatti1 << " << buffer << " " << i << " ";
}
}
//eri bitti, vaihdetaan
if (ap->last != NULL) ap->index = (ap->last)->index + 1;
ap->onlyOneBit = onlyOneBit;
//ny on uusi alkio linkattu
//ap on nyt saatu uusi alkio
//tarkistetaan voidaanko poistaa jokin alkio
if (deleteBits(ap)) { //ap, tai temp voitiin poistaa
if (lastBit) {
//cout << "ap:" << ap->index << " " << ap->bit << " " << ap->onlyOneBit << endl;
//cout << ap->index;
if (!completed){ //do not be in such a rush
if (ap->index != 0){
//cout << "asdf";
if (!deleteBits(ap)) {
goto failed;
} else break;
}
}
}
//cout << endl;printBits(a);
} else if (lastBit) { //alkioita ei voitu poistaa, viimeiset alkiot ovat menossa -> peli on päättynyt, peliä ei voitu ratkaista
failed:
//cout << endl;printBits(a);
cout << endl << "QAQ";
//printIndex();
freeMemory(a);
freeIndex();
return 0;
}
ap->next = (Bits *)malloc(sizeof(Bits *));
(ap->next)->last = ap;
ap = ap->next;
ap->bit = cur_bit;
//ap->onlyOneBit = false;
ap->next = NULL;
onlyOneBit = true;
} else if (onlyOneBit){
onlyOneBit = false;
}
}
}
//printBits(a); //tulostaa bitit a:sta alkaen
printIndex(); //tulostaa indeksit
freeIndex();
freeMemory(a);
return 0;
}
bool deleteBits(Bits *ap){ //ottaa syötteenä ap:n, eikä temp:iä poistettavasta alkiosta, sillä silloin saatettaisiin joutua tekemään turhaa kaksinkertaista tarkistusta, ja jouduttaisiinki
if ((temp = ap->last) != NULL) {
if ((temp = temp->last) != NULL){ //taaksepäin on linkki = temp, eli poistettava alkio on olemassa <-> eteenpäin on linkki, sillä ap on olemassa
//if (lastBit) cout << "asdfasdf"; pitäisi pitää paikkansa
//cout << "asf";
//tarkastetaan ensin tilanne, jossa molemmat linkit ovat täysiä
//kaikissa näissä temp:n pitää !onlyOneBit, sillä yhden bitin jonoja ei voida poistaa
if ((temp->last) != NULL) {
if ((temp->last)->last != NULL){ //linkki löytyi, temp-alkio voidaan poistaa
if (lastBit) {
temp = (temp->last)->last;
if (temp->last != NULL) {
temp = temp->last;
//cout << "asdf";
if (!temp->onlyOneBit) {
temp2 = temp->next;
temp2->last = NULL;
addIndex(temp->index);
free(temp); //tämä sekoittaa a:n, mutta sekoittakoot, ap kuitenkin pysyy oikealla paikalla, bittioperaatioita ei pidä tulostaa, joten ei tämä niinkään haittaa
//nyt pitää muuttaa indeksi kaikilla: temp2, temp2->next, temp2->next->next, temp->next->next->netx
do {
temp2->index--;
//cout << temp2->index;
} while((temp2 = temp2->next) != NULL);
return true;
} else goto A;
} else goto A;
} if (!temp->onlyOneBit){ //vasemmalle linkattava on yli yhden bitin, tarkistetaan onko sillä linkki toiseenkin suuntaan
//yhdistetään(, ei linkata) temp:iä seuraava ja sitä edeltävä alkio toisiinsa
//temp2 on temp:n vasen, eli last-puoli ja temp3 on oikea, eli next-puoli
temp2 = temp->last; //osoitetaan temp:lla temp:n lastiin, jotta voidaan poistaa temp
temp2->onlyOneBit = false; //uusi koko on aina väh.2bit
//temp2->bit // ei muutu
temp3 = temp->next;
//ap:n indeksiksi tulee poisttavan, eli temp:n indeksi
ap->index = temp->index; //muita indeksejä ei pidä vaihtaa, temp2:n indeksi säilyy temp2:sen ja temp3:sen hybridillä
addIndex(temp->index); //lisätään index myös listaan
free(temp); //voidaan poistaa temp, sillä molempiin sen ympärillä oleviin alkioihin osoitetaan jo
//säilytetään ainoastaan temp2, sillä siinä on kaikki tarvittava info -> aina kun poistetaan yksi alkio, poistetaan käytännössä kaksi, paitsi kun poistetaaan viimeinen alkio, jos poistetaan
temp2->next = temp3->next; //nyt kaikki info on temp2:ssa, joten:
ap->last = temp2;
free(temp3);
return true; //alkio voitiin poistaa
}
} else {
if (lastBit) {
goto A;
}
}
}
//return false; //turhaan, sillä lopussa on kuitenkin return false
} else goto A; //lastbit, 1 takana
} else { //ap:lla ei ole vasemmalle linkkiä, joten poistettavalla alkiolla(== ap) ei ole myöskään varmasti oikealle päin linkkiä
A: //jos linkkejä ei ole kumpaankaan suuntaan, ainoastaan ->last->last:n puuttuessa on tämä tilanne, sillä ->last->last:lla on aina ->next->next
//->tarkistetaan onko peli päättynyt = ei tule lisää merkkejä = lastBits == true
//cout << "ekomatti << ";
if (lastBit){ //jos peli on päättynyt
//cout << "ekomatti2 << ";
if (ap->last != NULL) {
ap = ap->last;
}
if (ap->onlyOneBit) {
if (ap->last != NULL) {
ap = ap->last;
}
} else if (!(ap->last)->onlyOneBit){
if (ap->last != NULL) {
ap = ap->last;
}
}
if (!ap->onlyOneBit) { //jos ap, poistettava alkio on yli yhden bitin bittainen, peli voidaan voittaa = alkio voidaan poistaa
temp = ap; //pointataan ap:n pointtaamaan alkioon, sillä ap pitää poistaa, mutta ap:n pitää toisaalta säilyä
addIndex(ap->index);
if ((ap = ap->last) != NULL) { //jos alkioita = alkio on vielä jäljellä
//(yläpuoli)siirretään ap yhden alkion takaisinpäin, sillä edellinen alkio = uusin alkio = listan pää poistetaan
if ((temp2 = temp->next/*==ap->next->next*/) != NULL){ //myös ap:n seuraava alkio on olemassa != mahdotonta, mutta harvinaista
//yhdistetään alkiot ap ja ap->next->next
//ap->onlyOneBit = false; //aivan turha laittaa falseksi, sillä tiedetään että se on aina false ja se poistetaan nyt jokatapauksessa
addIndex(ap->index); //lisätään ap:n indeksi, sillä se poistetaan nytten
//indeksi jää samaksi, mikä se nyt on
if (ap->index != 0) {
if (ap->last != NULL && temp2->next != NULL) {
addIndex((ap->last)->index);
completed = true;
return true;
}
return false;
} else if (ap->last == NULL && temp2->next == NULL) {
//poistetaan temp, ja yhdistetään ap ja temp2
//cout << endl;printIndex();cout << endl;
completed = true;
return true;
}
//free(temp->next); //poistetaan vanha alkio
//free(ap); //ja myös sen toinen osa, eli uusi hybridi, sillä peli on jokatapauksessa nyt päättynyt, joko häviöön tai voittoon
//cout << "last";
//kaikki ap, temp, temp->next on poistettu
//cout << "asdf";
}
} else {
completed = true;
return true;
}
//free(temp); //ap voi olla joko null tai ap->last, eli toivottavasti eka alkio, jos halutaan voittaa
} else { //muutoin peliä ei voida voittaa = alkiota ei voida poistaa = peli on päättynyt
return false;
}
}
} /*otherwise reutnr false*/
//tarkastetaan sitten tilanne, jossa molemmat linkit ovat tyhiä
//ja näiden else, eli tilanne, jossa toinen linkeistä on tyhjä saadaan 'else'.llä
//täällä poistetaan ne alkiot,
return false;
}
void freeMemory(Bits *a){
if (a==NULL) return;
Bits *ap = a;
Bits *ap2;
do{
ap2 = ap->next;
free(ap);
ap = ap2;
}while(ap2 != NULL) ;
}
void freeIndex(){
if (index_a==NULL) return;
Index *ap = index_a;
Index *ap2;
do{
ap2 = ap->next;
free(ap);
ap = ap2;
}while(ap2 != NULL) ;
}
void addIndex(unsigned int index){
static bool init_index = true;
if (!init_index) {
index_ap->next = (Index *)malloc(sizeof(Index *)); //luodaan uusi alkio
index_ap = index_ap->next; //siirrytään siihen
} else init_index = false;
index_ap->value = index; //muokataan sen arvo ja
index_ap->next = NULL; //alustetaan seuraava ap NULL == 0:ksi
}
void printBits(Bits *a){
if (a==NULL) return;
Bits *ap = a;
do{
cout << "bit: " << ap->onlyOneBit << " " << endl;
}while((ap = ap->next) != NULL) ;
}
void printIndex(){
if (index_a == NULL) return;
Index *ap = index_a;
do{
cout << ap->value << " ";
}while((ap = ap->next) != NULL) ;
}
Test details
Test 1
Subtask: 1
Verdict: ACCEPTED
| input |
|---|
| 1011001010 |
| correct output |
|---|
| QAQ |
| user output |
|---|
QAQ |
Test 2
Subtask: 1
Verdict: WRONG ANSWER
| input |
|---|
| 0000001001 |
| correct output |
|---|
| 3 1 1 1 |
| user output |
|---|
QAQ |
Test 3
Subtask: 1
Verdict: WRONG ANSWER
| input |
|---|
| 0111011100 |
| correct output |
|---|
| 3 2 1 1 |
| user output |
|---|
QAQ |
Test 4
Subtask: 1
Verdict: WRONG ANSWER
| input |
|---|
| 0100100100 |
| correct output |
|---|
| 4 2 1 1 1 |
| user output |
|---|
| 2 2 1 0 |
Test 5
Subtask: 1
Verdict: RUNTIME ERROR
| input |
|---|
| 1110010110 |
| correct output |
|---|
| 4 2 1 1 1 |
| user output |
|---|
| (empty) |
Test 6
Subtask: 1
Verdict: WRONG ANSWER
| input |
|---|
| 1111110110 |
| correct output |
|---|
| 3 1 1 1 |
| user output |
|---|
QAQ |
Test 7
Subtask: 1
Verdict: WRONG ANSWER
| input |
|---|
| 0011110001 |
| correct output |
|---|
| 3 1 2 1 |
| user output |
|---|
QAQ |
Test 8
Subtask: 1
Verdict: WRONG ANSWER
| input |
|---|
| 0111111000 |
| correct output |
|---|
| 2 1 1 |
| user output |
|---|
QAQ |
Test 9
Subtask: 1
Verdict: RUNTIME ERROR
| input |
|---|
| 1111111100 |
| correct output |
|---|
| 2 1 1 |
| user output |
|---|
| (empty) |
Test 10
Subtask: 1
Verdict: WRONG ANSWER
| input |
|---|
| 1000010011 |
| correct output |
|---|
| 3 2 1 1 |
| user output |
|---|
QAQ |
Test 11
Subtask: 1
Verdict: WRONG ANSWER
| input |
|---|
| 1101110000 |
| correct output |
|---|
| 3 1 1 1 |
| user output |
|---|
QAQ |
Test 12
Subtask: 1
Verdict: WRONG ANSWER
| input |
|---|
| 1101101100 |
| correct output |
|---|
| 4 1 2 1 1 |
| user output |
|---|
QAQ |
Test 13
Subtask: 1
Verdict: WRONG ANSWER
| input |
|---|
| 0100111110 |
| correct output |
|---|
| 3 1 1 1 |
| user output |
|---|
| 2 1 0 |
Test 14
Subtask: 1
Verdict: WRONG ANSWER
| input |
|---|
| 1101001011 |
| correct output |
|---|
| 4 2 2 2 1 |
| user output |
|---|
| 3 2 1 0 |
Test 15
Subtask: 1
Verdict: WRONG ANSWER
| input |
|---|
| 1110110010 |
| correct output |
|---|
| 4 1 2 1 1 |
| user output |
|---|
QAQ |
Test 16
Subtask: 1
Verdict: WRONG ANSWER
| input |
|---|
| 0011011100 |
| correct output |
|---|
| 3 3 2 1 |
| user output |
|---|
QAQ |
Test 17
Subtask: 1
Verdict: ACCEPTED
| input |
|---|
| 1100101011 |
| correct output |
|---|
| QAQ |
| user output |
|---|
QAQ |
Test 18
Subtask: 1
Verdict: WRONG ANSWER
| input |
|---|
| 1101100111 |
| correct output |
|---|
| 3 2 2 1 |
| user output |
|---|
| 2 1 0 |
Test 19
Subtask: 1
Verdict: WRONG ANSWER
| input |
|---|
| 0110000100 |
| correct output |
|---|
| 3 2 1 1 |
| user output |
|---|
| 2 1 0 |
Test 20
Subtask: 1
Verdict: ACCEPTED
| input |
|---|
| 0000101000 |
| correct output |
|---|
| QAQ |
| user output |
|---|
QAQ |
Test 21
Subtask: 2
Verdict: RUNTIME ERROR
| input |
|---|
| 1110010100 |
| correct output |
|---|
| QAQ |
| user output |
|---|
QAQ |
Error:
*** Error in `input/code': double free or corruption (fasttop): 0x0000000002311030 ***
Test 22
Subtask: 2
Verdict: WRONG ANSWER
| input |
|---|
| 1110010000 |
| correct output |
|---|
| 3 2 1 1 |
| user output |
|---|
QAQ |
Test 23
Subtask: 2
Verdict: WRONG ANSWER
| input |
|---|
| 1001101100 |
| correct output |
|---|
| 4 1 1 1 1 |
| user output |
|---|
QAQ |
Test 24
Subtask: 2
Verdict: RUNTIME ERROR
| input |
|---|
| 0000000111 |
| correct output |
|---|
| 2 1 1 |
| user output |
|---|
| (empty) |
Test 25
Subtask: 2
Verdict: WRONG ANSWER
| input |
|---|
| 0011111110 |
| correct output |
|---|
| 2 2 1 |
| user output |
|---|
QAQ |
Test 26
Subtask: 2
Verdict: RUNTIME ERROR
| input |
|---|
| 1100101100 |
| correct output |
|---|
| 4 2 1 1 1 |
| user output |
|---|
| (empty) |
Test 27
Subtask: 2
Verdict: WRONG ANSWER
| input |
|---|
| 0111101110 |
| correct output |
|---|
| 3 2 1 1 |
| user output |
|---|
QAQ |
Test 28
Subtask: 2
Verdict: WRONG ANSWER
| input |
|---|
| 0000011011 |
| correct output |
|---|
| 3 2 1 1 |
| user output |
|---|
QAQ |
Test 29
Subtask: 2
Verdict: WRONG ANSWER
| input |
|---|
| 1110011101 |
| correct output |
|---|
| 3 3 2 1 |
| user output |
|---|
| 2 1 0 |
Test 30
Subtask: 2
Verdict: RUNTIME ERROR
| input |
|---|
| 0001011011 |
| correct output |
|---|
| 4 1 1 1 1 |
| user output |
|---|
| (empty) |
Test 31
Subtask: 2
Verdict: RUNTIME ERROR
| input |
|---|
| 0010110011 |
| correct output |
|---|
| 4 1 1 1 1 |
| user output |
|---|
| (empty) |
Test 32
Subtask: 2
Verdict: WRONG ANSWER
| input |
|---|
| 0011100000 |
| correct output |
|---|
| 2 2 1 |
| user output |
|---|
QAQ |
Test 33
Subtask: 2
Verdict: RUNTIME ERROR
| input |
|---|
| 1110100110 |
| correct output |
|---|
| 4 1 1 1 1 |
| user output |
|---|
| (empty) |
Test 34
Subtask: 2
Verdict: WRONG ANSWER
| input |
|---|
| 0110110111 |
| correct output |
|---|
| 4 2 1 1 1 |
| user output |
|---|
| 3 2 1 |
Test 35
Subtask: 2
Verdict: WRONG ANSWER
| input |
|---|
| 1110110010 |
| correct output |
|---|
| 4 1 2 1 1 |
| user output |
|---|
QAQ |
Test 36
Subtask: 2
Verdict: WRONG ANSWER
| input |
|---|
| 110011001100110011001010101010... |
| correct output |
|---|
| QAQ |
| user output |
|---|
| 2 2 2 2 62 61 60 59 58 57 56 5... |
Test 37
Subtask: 2
Verdict: WRONG ANSWER
| input |
|---|
| 110011001100110011001100101010... |
| correct output |
|---|
| QAQ |
| user output |
|---|
| 2 2 2 2 2 52 51 50 49 48 47 46... |
Test 38
Subtask: 2
Verdict: WRONG ANSWER
| input |
|---|
| 110011001100110011001100110011... |
| correct output |
|---|
| 31 1 20 20 20 20 20 20 20 20 20 2... |
| user output |
|---|
| 2 2 2 2 2 2 2 2 2 22 21 20 19 ... |
Test 39
Subtask: 2
Verdict: WRONG ANSWER
| input |
|---|
| 010101010101010101010101010101... |
| correct output |
|---|
| 48 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ... |
| user output |
|---|
QAQ |
Test 40
Subtask: 2
Verdict: WRONG ANSWER
| input |
|---|
| 011010000011111011110000110011... |
| correct output |
|---|
| 23 13 13 12 11 11 11 11 10 9 9 9 ... |
| user output |
|---|
QAQ |
Test 41
Subtask: 3
Verdict: ACCEPTED
| input |
|---|
| 0010101000 |
| correct output |
|---|
| QAQ |
| user output |
|---|
QAQ |
Test 42
Subtask: 3
Verdict: WRONG ANSWER
| input |
|---|
| 0100010110 |
| correct output |
|---|
| 4 2 1 1 1 |
| user output |
|---|
QAQ |
Test 43
Subtask: 3
Verdict: WRONG ANSWER
| input |
|---|
| 0100110110 |
| correct output |
|---|
| 4 2 1 1 1 |
| user output |
|---|
QAQ |
Test 44
Subtask: 3
Verdict: WRONG ANSWER
| input |
|---|
| 1110000001 |
| correct output |
|---|
| 2 2 1 |
| user output |
|---|
QAQ |
Test 45
Subtask: 3
Verdict: WRONG ANSWER
| input |
|---|
| 0001001110 |
| correct output |
|---|
| 3 2 2 1 |
| user output |
|---|
| 2 1 0 |
Test 46
Subtask: 3
Verdict: WRONG ANSWER
| input |
|---|
| 0011100011 |
| correct output |
|---|
| 3 1 2 1 |
| user output |
|---|
QAQ |
Test 47
Subtask: 3
Verdict: WRONG ANSWER
| input |
|---|
| 0100111100 |
| correct output |
|---|
| 3 1 1 1 |
| user output |
|---|
| 2 1 0 |
Test 48
Subtask: 3
Verdict: WRONG ANSWER
| input |
|---|
| 0001001000 |
| correct output |
|---|
| 3 2 2 1 |
| user output |
|---|
| 2 1 0 |
Test 49
Subtask: 3
Verdict: WRONG ANSWER
| input |
|---|
| 0100100010 |
| correct output |
|---|
| 4 2 1 1 1 |
| user output |
|---|
| 2 2 1 0 |
Test 50
Subtask: 3
Verdict: RUNTIME ERROR
| input |
|---|
| 1100101110 |
| correct output |
|---|
| 4 2 1 1 1 |
| user output |
|---|
| (empty) |
Test 51
Subtask: 3
Verdict: WRONG ANSWER
| input |
|---|
| 1000111011 |
| correct output |
|---|
| 3 2 1 1 |
| user output |
|---|
| 2 1 0 |
Test 52
Subtask: 3
Verdict: WRONG ANSWER
| input |
|---|
| 1000111111 |
| correct output |
|---|
| 2 1 1 |
| user output |
|---|
QAQ |
Test 53
Subtask: 3
Verdict: WRONG ANSWER
| input |
|---|
| 0110011100 |
| correct output |
|---|
| 3 2 1 1 |
| user output |
|---|
| 2 1 0 |
Test 54
Subtask: 3
Verdict: WRONG ANSWER
| input |
|---|
| 0001000110 |
| correct output |
|---|
| 3 2 2 1 |
| user output |
|---|
| 2 1 0 |
Test 55
Subtask: 3
Verdict: WRONG ANSWER
| input |
|---|
| 1110110010 |
| correct output |
|---|
| 4 1 2 1 1 |
| user output |
|---|
QAQ |
Test 56
Subtask: 3
Verdict: WRONG ANSWER
| input |
|---|
| 110011001100110011001100110011... |
| correct output |
|---|
| QAQ |
| user output |
|---|
| 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ... |
Test 57
Subtask: 3
Verdict: WRONG ANSWER
| input |
|---|
| 110011001100110011001100110011... |
| correct output |
|---|
| QAQ |
| user output |
|---|
| 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ... |
Test 58
Subtask: 3
Verdict: WRONG ANSWER
| input |
|---|
| 110011001100110011001100110011... |
| correct output |
|---|
| 1501 1 1000 1000 1000 1000 1000 100... |
| user output |
|---|
| 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ... |
Test 59
Subtask: 3
Verdict: WRONG ANSWER
| input |
|---|
| 010101010101010101010101010101... |
| correct output |
|---|
| 2498 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ... |
| user output |
|---|
QAQ |
Test 60
Subtask: 3
Verdict: WRONG ANSWER
| input |
|---|
| 011100011001011111111000010110... |
| correct output |
|---|
| 1272 1 1 648 647 646 646 645 645 64... |
| user output |
|---|
QAQ |
Test 61
Subtask: 4
Verdict: RUNTIME ERROR
| input |
|---|
| 1110101110 |
| correct output |
|---|
| QAQ |
| user output |
|---|
| (empty) |
Test 62
Subtask: 4
Verdict: WRONG ANSWER
| input |
|---|
| 0111001011 |
| correct output |
|---|
| 4 2 1 1 1 |
| user output |
|---|
QAQ |
Test 63
Subtask: 4
Verdict: WRONG ANSWER
| input |
|---|
| 1101111101 |
| correct output |
|---|
| 3 2 2 1 |
| user output |
|---|
| 2 1 0 |
Test 64
Subtask: 4
Verdict: WRONG ANSWER
| input |
|---|
| 1001110001 |
| correct output |
|---|
| 3 2 1 1 |
| user output |
|---|
| 2 1 0 |
Test 65
Subtask: 4
Verdict: WRONG ANSWER
| input |
|---|
| 1000000011 |
| correct output |
|---|
| 2 1 1 |
| user output |
|---|
QAQ |
Test 66
Subtask: 4
Verdict: WRONG ANSWER
| input |
|---|
| 0100010111 |
| correct output |
|---|
| 4 1 1 1 1 |
| user output |
|---|
QAQ |
Test 67
Subtask: 4
Verdict: WRONG ANSWER
| input |
|---|
| 0100111010 |
| correct output |
|---|
| 4 2 1 1 1 |
| user output |
|---|
QAQ |
Test 68
Subtask: 4
Verdict: RUNTIME ERROR
| input |
|---|
| 0010111101 |
| correct output |
|---|
| 4 1 1 1 1 |
| user output |
|---|
| (empty) |
Test 69
Subtask: 4
Verdict: WRONG ANSWER
| input |
|---|
| 0011111000 |
| correct output |
|---|
| 2 2 1 |
| user output |
|---|
QAQ |
Test 70
Subtask: 4
Verdict: WRONG ANSWER
| input |
|---|
| 1101001101 |
| correct output |
|---|
| 4 2 2 2 1 |
| user output |
|---|
| 3 2 1 0 |
Test 71
Subtask: 4
Verdict: WRONG ANSWER
| input |
|---|
| 0110111000 |
| correct output |
|---|
| 3 2 1 1 |
| user output |
|---|
QAQ |
Test 72
Subtask: 4
Verdict: WRONG ANSWER
| input |
|---|
| 1100110111 |
| correct output |
|---|
| 3 3 2 1 |
| user output |
|---|
| 2 1 0 |
Test 73
Subtask: 4
Verdict: WRONG ANSWER
| input |
|---|
| 1110011111 |
| correct output |
|---|
| 2 2 1 |
| user output |
|---|
QAQ |
Test 74
Subtask: 4
Verdict: WRONG ANSWER
| input |
|---|
| 1011000101 |
| correct output |
|---|
| 4 2 1 1 1 |
| user output |
|---|
QAQ |
Test 75
Subtask: 4
Verdict: WRONG ANSWER
| input |
|---|
| 1110110010 |
| correct output |
|---|
| 4 1 2 1 1 |
| user output |
|---|
QAQ |
Test 76
Subtask: 4
Verdict: WRONG ANSWER
| input |
|---|
| 110011001100110011001100110011... |
| correct output |
|---|
| QAQ |
| user output |
|---|
| 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ... |
Test 77
Subtask: 4
Verdict: WRONG ANSWER
| input |
|---|
| 110011001100110011001100110011... |
| correct output |
|---|
| QAQ |
| user output |
|---|
| 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ... |
Test 78
Subtask: 4
Verdict: WRONG ANSWER
| input |
|---|
| 110011001100110011001100110011... |
| correct output |
|---|
| 30001 1 20000 20000 20000 20000 2000... |
| user output |
|---|
| 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ... |
Test 79
Subtask: 4
Verdict: WRONG ANSWER
| input |
|---|
| 010101010101010101010101010101... |
| correct output |
|---|
| 49998 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ... |
| user output |
|---|
QAQ |
Test 80
Subtask: 4
Verdict: WRONG ANSWER
| input |
|---|
| 111000110000011000001101010010... |
| correct output |
|---|
| 25011 1 12471 12470 12469 12468 1246... |
| user output |
|---|
QAQ |
