# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
381004 | 2021-03-24T07:39:41 Z | Karliver | Paint By Numbers (IOI16_paint) | C++14 | 2 ms | 492 KB |
#include "paint.h" #include <cstdlib> #include <bits/stdc++.h> #include <fstream> #define FIXED_FLOAT(x) std::fixed <<std::setprecision(20) << (x) #define all(v) (v).begin(), (v).end() using namespace std; #define forn(i,n) for (int i = 0; i < (n); ++i) using ll = long long; int mod = (ll)1e9 + 7; #define PI acos(-1) typedef pair<int, int> pairs; typedef complex<ll> G; const int INF = 1e9 + 1; const int N = 1e6; const double eps = 1e-3; std::string solve_puzzle(std::string s, std::vector<int> c) { int k = c.size(); int n = s.size(); int f = 0; bool bad = 0; for(int i = 0;i < n;) { int cnt = 0; int j = i; char pr = s[i]; if(s[i] == 'X' || s[i] == '.') { while(j < n && (s[j] == '.' || s[j] == 'X'))++j; while(f < k && j - i >= c[f]) { while(c[f]) { --c[f]; assert(i < n); s[i] = 'X'; ++i; } ++i; ++f; } i = j; } else { while(i < n && s[i] == '_')++i; } } forn(i, n)if(s[i] == '.')s[i] = '_'; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 492 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 492 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 492 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 492 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 492 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 492 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 492 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |