CSES - Datatähti 2024 loppu - Results
Submission details
Task:Sukat
Sender:ToukoP
Submission time:2024-01-20 13:22:49 +0200
Language:C++11
Status:READY
Result:0
Feedback
groupverdictscore
#10
#20
#30
Test results
testverdicttimegroup
#10.00 s1, 2, 3details
#20.00 s1, 2, 3details
#30.00 s1, 2, 3details
#40.00 s1, 2, 3details
#50.00 s1, 2, 3details
#60.00 s1, 2, 3details
#70.00 s1, 2, 3details
#80.00 s2, 3details
#90.00 s2, 3details
#100.00 s2, 3details
#110.00 s2, 3details
#120.00 s2, 3details
#130.00 s2, 3details
#140.00 s2, 3details
#150.03 s3details
#160.03 s3details
#170.03 s3details
#180.03 s3details
#190.03 s3details
#200.03 s3details
#210.03 s3details

Compiler report

input/code.cpp: In function 'int main()':
input/code.cpp:12:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   12 |     for (int i = 0; i < s.length(); i++) {
      |                     ~~^~~~~~~~~~~~
input/code.cpp:18:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   18 |     for (int i = 0; i < s.length(); i++) {
      |                     ~~^~~~~~~~~~~~

Code

#include <bits/stdc++.h>

using namespace std;

int main() {
    string abc = "ABCDEFGHIJKLMNOPQRSTUWVXYZ";
    
    string s;
    cin >> s;
    
    deque<int> sukat;
    for (int i = 0; i < s.length(); i++) {
        sukat.push_back((int) s[i]);
    }

    sort(sukat.begin(), sukat.end());

    for (int i = 0; i < s.length(); i++) {
        cout << ((char) sukat.back()) << ((char) sukat.front()) << "\n";
        sukat.pop_back();
        sukat.pop_front();
    }
}

// g++ --std=c++11 -O2 -Wall test.cpp -o test && ./test

Test details

Test 1

Group: 1, 2, 3

Verdict:

input
QBAXGXJZJS

correct output
5
XJ
ZX
SQ
JG
...

user output
ZA
XB
XG
SJ
QJ
...

Test 2

Group: 1, 2, 3

Verdict:

input
SSSSSSSSSS

correct output
0

user output
SS
SS
SS
SS
SS
...

Test 3

Group: 1, 2, 3

Verdict:

input
SETTSESEEE

correct output
5
ES
ET
ES
ET
...

user output
TE
TE
SE
SE
SE
...

Test 4

Group: 1, 2, 3

Verdict:

input
SSMRSSSSKR

correct output
4
SR
SR
SM
SK

user output
SK
SM
SR
SR
SS
...

Test 5

Group: 1, 2, 3

Verdict:

input
BIIILIIRRL

correct output
5
IR
IL
IR
IL
...

user output
RB
RI
LI
LI
II
...

Test 6

Group: 1, 2, 3

Verdict:

input
YYGEYTDSTY

correct output
5
YT
YT
YS
YG
...

user output
YD
YE
YG
YS
TT
...

Test 7

Group: 1, 2, 3

Verdict:

input
MMMMMMMMMN

correct output
1
MN

user output
NM
MM
MM
MM
MM
...

Test 8

Group: 2, 3

Verdict:

input
XQQZJQDDJOWXDFVQUIODDJIZIQDQIW...

correct output
500
DQ
DQ
DQ
DQ
...

user output
(empty)

Error:
double free or corruption (!prev)

Test 9

Group: 2, 3

Verdict:

input
IIIIIIIIIIIIIIIIIIIIIIIIIIIIII...

correct output
0

user output
(empty)

Error:
double free or corruption (!prev)

Test 10

Group: 2, 3

Verdict:

input
KEOHHYHHAIHLLHEKIHKAHHHHOHEHHE...

correct output
493
HA
HA
HA
HA
...

user output
(empty)

Error:
double free or corruption (!prev)

Test 11

Group: 2, 3

Verdict:

input
WNNFXQNODQFSQVQQPNLQNQNNVVNXHN...

correct output
499
NQ
NQ
NQ
NQ
...

user output
(empty)

Error:
double free or corruption (!prev)

Test 12

Group: 2, 3

Verdict:

input
VGAHMMMXMMVXAAMMMOMMMXVMMMYMXT...

correct output
500
MH
MH
MH
MH
...

user output
(empty)

Error:
double free or corruption (!prev)

Test 13

Group: 2, 3

Verdict:

input
KKKKUUAKKAUKKKKFKKSVKCWKKKCVOJ...

correct output
500
KI
KI
KI
KI
...

user output
(empty)

Error:
double free or corruption (!prev)

Test 14

Group: 2, 3

Verdict:

input
VVVVVVVVVVVVVVVVVVVVVVVVVVVVVV...

correct output
100
VP
VP
VP
VP
...

user output
(empty)

Error:
double free or corruption (!prev)

Test 15

Group: 3

Verdict:

input
FKKJJBWTSFCDEKFPOKIPWZSVKHACMC...

correct output
100000
CK
CK
CK
CK
...

user output
ZA
ZA
ZA
ZA
ZA
...
Truncated

Error:
corrupted size vs. prev_size while consolidating

Test 16

Group: 3

Verdict:

input
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

correct output
0

user output
RR
RR
RR
RR
RR
...
Truncated

Error:
corrupted size vs. prev_size while consolidating

Test 17

Group: 3

Verdict:

input
WVKKVVADNVCVKLVYVVZVKVCTNKVLVV...

correct output
99925
VC
VC
VC
VC
...

user output
ZA
ZA
ZA
ZA
ZA
...
Truncated

Error:
corrupted size vs. prev_size while consolidating

Test 18

Group: 3

Verdict:

input
BBBBBDNXDZQXBBYBBWBSBTMADXBBVZ...

correct output
99999
BE
BE
BE
BE
...

user output
ZA
ZA
ZA
ZA
ZA
...
Truncated

Error:
corrupted size vs. prev_size while consolidating

Test 19

Group: 3

Verdict:

input
FBRDPLUMLZMLLLUFUCLEMCMULLZLFL...

correct output
100000
LU
LU
LU
LU
...

user output
ZA
ZA
ZA
ZA
ZA
...
Truncated

Error:
corrupted size vs. prev_size while consolidating

Test 20

Group: 3

Verdict:

input
UUBUBUTUJSLUVBUXTUUMUXUXTMXUXS...

correct output
100000
UX
UX
UX
UX
...

user output
ZA
ZA
ZA
ZA
ZA
...
Truncated

Error:
corrupted size vs. prev_size while consolidating

Test 21

Group: 3

Verdict:

input
PPPPPPPPPPEPPPPPPPPPPBOPPPPPPP...

correct output
20000
PB
PB
PB
PB
...

user output
ZA
ZA
ZA
ZA
ZA
...
Truncated

Error:
corrupted size vs. prev_size while consolidating