(UPD: 2024-12-04 14:48 UTC) Judge is not working due to Cloudflare incident. (URL) We can do nothing about it, sorry. After the incident is resolved, we will grade all submissions.

Submission #649561

#TimeUsernameProblemLanguageResultExecution timeMemory
649561Ghosty_v2Quality Of Living (IOI10_quality)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ios_base::sync_with_stdio(false); cin.tie(0); int r,c,h,w; cin>>r>>c>>h>>w; int arr[r][c]; for(int i=0;i<r;i++) { for(int j=0;j<c;j++) { int a; cin>>a; arr[i][j] = a; } } int ans = INT_MAX; for(int i=0;i<r;i++) { vector <int> subvec for(int j=0;j<c;j++) { subvec.push_back(arr[i][j]); } sort(subvec.begin(),subvec.end()); ans= min(ans,subvec[(r*c)/2]); } cout<<ans<<endl; return 0; }

Compilation message (stderr)

quality.cpp: In function 'int main()':
quality.cpp:26:3: error: expected initializer before 'for'
   26 |   for(int j=0;j<c;j++) {
      |   ^~~
quality.cpp:26:15: error: 'j' was not declared in this scope
   26 |   for(int j=0;j<c;j++) {
      |               ^
quality.cpp:30:8: error: 'subvec' was not declared in this scope
   30 |   sort(subvec.begin(),subvec.end());
      |        ^~~~~~