Submission #596948

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
5969482022-07-15 09:50:34PiejanVDCScales (IOI15_scales)C++17
38.46 / 100
1 ms212 KiB
#include "scales.h"
#include <bits/stdc++.h>
using namespace std;
void init(int t) {
}
void orderCoins() {
int vis[7][7][7];
for(int i = 1 ; i <= 6 ; i++)
for(int j = 1 ; j <= 6 ; j++)
for(int k = 1 ; k <= 6 ; k++)
vis[i][j][k] = 0;
int a;
int ans[6] = {1, 2, 3, 4, 5, 6};
for(int t = 0 ; t < 2 ; t++) {
for(int i = 0 ; i < 4 ; i++) {
if(vis[ans[i]][ans[i+1]][ans[i+2]])
a = vis[ans[i]][ans[i+1]][ans[i+2]];
else
a = vis[ans[i]][ans[i+1]][ans[i+2]] = getLightest(ans[i], ans[i+1], ans[i+2]);
if(ans[i+1] == a)
swap(ans[i], ans[i+1]);
if(ans[i+2] == a)
swap(ans[i], ans[i+2]);
}
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

scales.cpp: In function 'void init(int)':
scales.cpp:5:15: warning: unused parameter 't' [-Wunused-parameter]
    5 | void init(int t) {
      |           ~~~~^
#Verdict Execution timeMemoryGrader output
Fetching results...