답안 #528094

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
528094 2022-02-19T08:39:37 Z aris12345678 Jarvis (COCI19_jarvis) C++14
0 / 70
34 ms 2576 KB
#include <bits/stdc++.h>
using namespace std;

#define X first
#define Y second

int main() {
    int n;
    scanf("%d", &n);
    vector<int> a(n);
    for(int i = 0; i < n; i++)
        scanf("%d", &a[i]);
    map<int, int> mp;
    for(int i = 0; i < n; i++) {
        int b;
        scanf("%d", &b);
        mp[b-a[i]]++;
    }
    printf("%d\n", mp.rbegin()->Y);
    return 0;
}

Compilation message

jarvis.cpp: In function 'int main()':
jarvis.cpp:9:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    9 |     scanf("%d", &n);
      |     ~~~~~^~~~~~~~~~
jarvis.cpp:12:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   12 |         scanf("%d", &a[i]);
      |         ~~~~~^~~~~~~~~~~~~
jarvis.cpp:16:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   16 |         scanf("%d", &b);
      |         ~~~~~^~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 208 KB Output isn't correct
2 Incorrect 17 ms 1104 KB Output isn't correct
3 Incorrect 17 ms 1068 KB Output isn't correct
4 Incorrect 17 ms 1064 KB Output isn't correct
5 Incorrect 21 ms 2064 KB Output isn't correct
6 Incorrect 24 ms 2080 KB Output isn't correct
7 Incorrect 24 ms 2084 KB Output isn't correct
8 Incorrect 24 ms 2076 KB Output isn't correct
9 Incorrect 33 ms 2576 KB Output isn't correct
10 Incorrect 34 ms 2512 KB Output isn't correct