Submission #1224458

#TimeUsernameProblemLanguageResultExecution timeMemory
1224458LIAPaint By Numbers (IOI16_paint)C++17
7 / 100
0 ms328 KiB
#include "paint.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef tuple <ll,ll,ll> plll; typedef vector <plll> vplll; typedef pair <ll,ll> pll; typedef vector <ll> vll; typedef vector <pll> vpll; typedef vector <vector <pll>> vvpll; typedef vector <vector <ll>> vvll; typedef vector <bool> vb; typedef vector <vector <bool>> vvb; #define loop(i, s, e) for (ll i = (s); i < (e); ++i) #define loopr(i, e, s) for (ll i = (e)-1; i >= (s); --i) #define all(a) a.begin(), a.end() const ll inf = 1e9 + 7; std::string solve_puzzle(std::string s, std::vector<int> c) { ll n = s.size(), k = c.size(); ll c1 = c[0]; vll vis(n); loop(i,0,c1) vis[i]++; loopr(i,n,n-c1) vis[i]++; string ans(n, '?'); loop(i,0,n) { if (vis[i]== 2) ans[i] = 'X'; } return ans; }

Compilation message (stderr)

paint.h:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~
paint_c.h:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...