Submission #361218

#TimeUsernameProblemLanguageResultExecution timeMemory
361218Sparky_09Paint By Numbers (IOI16_paint)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for(int i = a; i < (b); ++i) #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() typedef long long ll; typedef pair<ll, ll> pii; typedef vector<ll> vi; typedef vector<pii> vpi; void usaco(string s){ freopen((s+".in").c_str(), "r", stdin); freopen((s+".out").c_str(), "w", stdout); } string solve_puzzle(string s, int[] c){ string ans = s; for(int i = 0; i < sz(s); i++) ans[i] = '?'; return ans; }

Compilation message (stderr)

paint.cpp:17:37: error: expected ',' or '...' before 'c'
   17 | string solve_puzzle(string s, int[] c){
      |                                     ^
paint.cpp: In function 'void usaco(std::string)':
paint.cpp:12:10: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
   12 |   freopen((s+".in").c_str(), "r", stdin);
      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
paint.cpp:13:10: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
   13 |   freopen((s+".out").c_str(), "w", stdout);
      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~