답안 #223390

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
223390 2020-04-15T08:32:03 Z dantoh000 Matching (COCI20_matching) C++14
5 / 110
11 ms 2944 KB
#include <bits/stdc++.h>
using namespace std;
vector<int> ans[100005];
int main(){
    int n;
    scanf("%d",&n);
    for (int i = 0; i < n; i++ ){
        int x,y;
        scanf("%d%d",&x,&y);
        ans[x].push_back(i+1);
    }
    printf("DA\n");
    for (int i = 0; i <= 100000; i++){
        for (auto x : ans[i]) printf("%d ",x);
        printf("\n");
    }

}

Compilation message

matching.cpp: In function 'int main()':
matching.cpp:6:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&n);
     ~~~~~^~~~~~~~~
matching.cpp:9:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d%d",&x,&y);
         ~~~~~^~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 2944 KB Output is correct
2 Correct 9 ms 2816 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 2944 KB Output is correct
2 Correct 9 ms 2816 KB Output is correct
3 Correct 10 ms 2816 KB Output is correct
4 Correct 9 ms 2816 KB Output is correct
5 Incorrect 11 ms 2816 KB Output isn't correct
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 2944 KB Output is correct
2 Correct 9 ms 2816 KB Output is correct
3 Correct 10 ms 2816 KB Output is correct
4 Correct 9 ms 2816 KB Output is correct
5 Incorrect 11 ms 2816 KB Output isn't correct
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 2944 KB Output is correct
2 Correct 9 ms 2816 KB Output is correct
3 Correct 10 ms 2816 KB Output is correct
4 Correct 9 ms 2816 KB Output is correct
5 Incorrect 11 ms 2816 KB Output isn't correct
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 2944 KB Output is correct
2 Correct 9 ms 2816 KB Output is correct
3 Correct 10 ms 2816 KB Output is correct
4 Correct 9 ms 2816 KB Output is correct
5 Incorrect 11 ms 2816 KB Output isn't correct
6 Halted 0 ms 0 KB -