제출 #491417

#제출 시각아이디문제언어결과실행 시간메모리
491417arnav_mehtaBest Place (NOI17_bestplace)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; long long n,x,y; /* thinking... 6 1 0 3 0 5 0 7 0 9 0 11 0 to find x,y we can do it by MEAN! */ long long sx,xy; int main() { cin>>n; for(long long i =0;i<n;++i){ cin>>x>>y; sx+=x; sy+=y; } cout<<(sx/n)<<" "<<(sy/n); }

컴파일 시 표준 에러 (stderr) 메시지

bestplace.cpp: In function 'int main()':
bestplace.cpp:24:9: error: 'sy' was not declared in this scope; did you mean 'xy'?
   24 |         sy+=y;
      |         ^~
      |         xy
bestplace.cpp:26:25: error: 'sy' was not declared in this scope; did you mean 'xy'?
   26 |     cout<<(sx/n)<<" "<<(sy/n);
      |                         ^~
      |                         xy