제출 #729923

#제출 시각아이디문제언어결과실행 시간메모리
729923Akshat369Best Place (NOI17_bestplace)C++17
0 / 100
138 ms95288 KiB
#include <bits/stdc++.h>

using namespace std;
#define int long long
#define endl '\n'
#define size size()
const int mod = 1000 * 1000 * 1000 + 7;
const int N = 100005;

signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
#ifndef ONLINE_JUDGE
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
    freopen("error.txt", "w", stderr);
#endif

    int n;
    cin>>n;
    int a[n],b[n];
    for (int i = 0; i < n; ++i) {
        cin>>a[i]>>b[i];
    }
    int x = 0, y= 0;
    for (int i = 0; i < n; ++i) {
        x += a[i];
        y+= b[i];
    }
    x = x / n;
    y = y / n;
    cout<<x<<" "<<y<<endl;

}

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

bestplace.cpp: In function 'int main()':
bestplace.cpp:14:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   14 |     freopen("in.txt", "r", stdin);
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
bestplace.cpp:15:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   15 |     freopen("out.txt", "w", stdout);
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
bestplace.cpp:16:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   16 |     freopen("error.txt", "w", stderr);
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
#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...