제출 #830786

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
8307862023-08-19 10:36:32drdilyor저울 (IOI15_scales)C++17
0 / 100
10 ms516 KiB
#include<bits/stdc++.h>
#include "scales.h"
using namespace std;
using ll = long long;
#define sz(x) int((x).size())
ll pw3[30];
const int n = 6;
const int inf = 1e9;
using st = array<int, 6>;
using op = tuple<int,int,int,int,int>;
map<vector<st>, op> usedop;
array<vector<st>, 3> getNext(vector<st> cur, op op) {
auto [t, a, b, c, d] = op;
array<vector<st>, 3> next{{}};
if (t == 0) {
for (auto& i : cur) {
int mn = min({i[a], i[b], i[c]});
if (i[a] == mn)
next[0].push_back(i);
else if (i[b] == mn)
next[1].push_back(i);
else
next[2].push_back(i);
}
} else if (t == 1) {
for (auto& i : cur) {
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

컴파일 시 표준 에러 (stderr) 메시지

scales.cpp: In function 'std::array<std::vector<std::array<int, 6> >, 3> getNext(std::vector<std::array<int, 6> >, op)':
scales.cpp:16:49: warning: declaration of 'op' shadows a global declaration [-Wshadow]
   16 | array<vector<st>, 3> getNext(vector<st> cur, op op) {
      |                                              ~~~^~
scales.cpp:12:7: note: shadowed declaration is here
   12 | using op = tuple<int,int,int,int,int>;
      |       ^~
scales.cpp:41:19: warning: declaration of 'array<...auto...> cur' shadows a parameter [-Wshadow]
   41 |             array cur{i[a], i[b], i[c]};
      |                   ^~~
scales.cpp:16:41: note: shadowed declaration is here
   16 | array<vector<st>, 3> getNext(vector<st> cur, op op) {
      |                              ~~~~~~~~~~~^~~
scales.cpp: In function 'int cost(std::array<std::vector<std::array<int, 6> >, 3>)':
scales.cpp:55:15: warning: conversion from 'long unsigned int' to 'int' may change value [-Wconversion]
   55 |     return max({pos[0].size(), pos[1].size(), pos[2].size()});
      |            ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scales.cpp: In lambda function:
scales.cpp:65:28: warning: declaration of 'op' shadows a global declaration [-Wshadow]
   65 |     auto tryAccept =[&](op op) {
      |                         ~~~^~
scales.cpp:12:7: note: shadowed declaration is here
   12 | using op = tuple<int,int,int,int,int>;
      |       ^~
scales.cpp:67:21: warning: conversion from 'long unsigned int' to 'int' may change value [-Wconversion]
   67 |         int mx = max({next[0].size(), next[1].size(), next[2].size()});
      |                  ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scales.cpp: In function 'void init(int)':
scales.cpp:93:15: warning: unused parameter 'T' [-Wunused-parameter]
   93 | void init(int T) {
      |           ~~~~^
scales.cpp: In function 'void orderCoins()':
scales.cpp:119:14: warning: declaration of 'op' shadows a global declaration [-Wshadow]
  119 |         auto op = usedop[pos];
      |              ^~
scales.cpp:12:7: note: shadowed declaration is here
   12 | using op = tuple<int,int,int,int,int>;
      |       ^~
#Verdict Execution timeMemoryGrader output
Fetching results...