답안 #1048642

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1048642 2024-08-08T08:55:02 Z 5시간 대회를 2시간으로 즐길 수 있다니 완전 럭키비키잖아~(#11095) Make them Meet (EGOI24_makethemmeet) C++17
0 / 100
0 ms 348 KB
#include <bits/stdc++.h>
using namespace std;

int main(void) {
    int n,m;
    scanf("%d %d",&n,&m);
    for(int i=0;i<m;i++) {
        int u,v;
        scanf("%d %d",&u,&v);
    }
    printf("%d\n",n+1);
    for(int i=0;i<2;i++) {
        for(int j=0;j<n;j++) {
            printf("0 ");
        }
        printf("\n");
    }
    for(int i=1;i<n;i++) {
        printf("0 ");
        for(int j=1;j<n;j++) {
            printf("%d ",i==j?0:1);
        }
        printf("\n");
    }
}

Compilation message

Main.cpp: In function 'int main()':
Main.cpp:6:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    6 |     scanf("%d %d",&n,&m);
      |     ~~~~~^~~~~~~~~~~~~~~
Main.cpp:9:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    9 |         scanf("%d %d",&u,&v);
      |         ~~~~~^~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB If people start at 0 and 2, then they can avoid each other
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB If people start at 0 and 1, then they can avoid each other
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB If people start at 1 and 2, then they can avoid each other
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB If people start at 0 and 2, then they can avoid each other
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB If people start at 0 and 2, then they can avoid each other
3 Halted 0 ms 0 KB -