Submission #133793

# Submission time Handle Problem Language Result Execution time Memory
133793 2019-07-21T11:35:11 Z Runtime_error_ Scales (IOI15_scales) C++14
0 / 100
6 ms 508 KB
#include "scales.h"
#include <bits/stdc++.h>
using namespace std;
int mn = 1;

void init(int T) {

}

bool cmp(int x,int y){

    int tmp = getHeaviest(mn,x,y);
    return (tmp == y);
}

void orderCoins() {
    int W[] = {1, 2, 3, 4, 5, 6};
    mn = getLightest( 1 , getLightest(1,2,3) , getLightest(4,5,6) );
    for(int i=1;i<6;i++)
        if(W[i] == mn)
            swap(W[i],W[0]);

    sort(W+1,W+6,cmp);
    answer(W);
}

Compilation message

scales.cpp: In function 'void init(int)':
scales.cpp:6:15: warning: unused parameter 'T' [-Wunused-parameter]
 void init(int T) {
               ^
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Runtime error 2 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
3 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
4 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
5 Runtime error 3 ms 508 KB Execution killed with signal 11 (could be triggered by violating memory limits)
6 Runtime error 2 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
7 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
8 Runtime error 2 ms 380 KB Execution killed with signal 11 (could be triggered by violating memory limits)
9 Runtime error 4 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
10 Runtime error 3 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
11 Runtime error 6 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
12 Runtime error 3 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
13 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
14 Runtime error 2 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
15 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
16 Runtime error 3 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
17 Runtime error 3 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
18 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
19 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
20 Runtime error 2 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
21 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
22 Runtime error 2 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
23 Runtime error 0 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
24 Runtime error 2 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
25 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
26 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
27 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
28 Runtime error 2 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
29 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
30 Runtime error 2 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
31 Runtime error 2 ms 380 KB Execution killed with signal 11 (could be triggered by violating memory limits)
32 Runtime error 2 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
33 Runtime error 3 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
34 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
35 Runtime error 3 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
36 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
37 Runtime error 3 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
38 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
39 Runtime error 2 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
40 Runtime error 2 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)