Submission #223387

# Submission time Handle Problem Language Result Execution time Memory
223387 2020-04-15T08:31:34 Z dantoh000 Matching (COCI20_matching) C++14
0 / 110
9 ms 2816 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(y);
    }
    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);
         ~~~~~^~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 9 ms 2816 KB Integer parameter [name=a] equals to 59715, violates the range [1, 20]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 9 ms 2816 KB Integer parameter [name=a] equals to 59715, violates the range [1, 20]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 9 ms 2816 KB Integer parameter [name=a] equals to 59715, violates the range [1, 20]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 9 ms 2816 KB Integer parameter [name=a] equals to 59715, violates the range [1, 20]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 9 ms 2816 KB Integer parameter [name=a] equals to 59715, violates the range [1, 20]
2 Halted 0 ms 0 KB -