Submission #1071415

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10714152024-08-23 07:14:48mc061Unscrambling a Messy Bug (IOI16_messy)C++14
38 / 100
1 ms440 KiB
#pragma once
#include <bits/stdc++.h>
using namespace std;
void add_element(std::string x);
bool check_element(std::string x);
void compile_set();
std::vector<int> restore_permutation(int n, int w, int r) {
string s(n, '0');
for (int i = 0; i < n-1; ++i) {
s[i] = '1';
add_element(s);
}
compile_set();
vector<pair<int, int>> know;
vector<bool> busy(n, false);
for (int bits = 1; bits < n; ++bits) {
string cur(n, '0');
for (auto [was, now] : know) {
cur[now] = '1';
}
vector<string> pot;
for (int i = 0; i < n; ++i) {
if (cur[i] == '1') continue;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

messy.cpp:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~
messy.cpp: In function 'std::vector<int> restore_permutation(int, int, int)':
messy.cpp:22:19: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
   22 |         for (auto [was, now] : know) {
      |                   ^
messy.cpp:34:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::__cxx11::basic_string<char> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   34 |         for (int i = 0; i < pot.size(); ++i) {
      |                         ~~^~~~~~~~~~~~
messy.cpp:50:15: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
   50 |     for (auto [was, now] : know) {
      |               ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...