답안 #595760

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
595760 2022-07-14T06:12:39 Z 조영욱(#8444) IOI 바이러스 (JOI21_fever) C++17
0 / 100
1 ms 212 KB
#include <bits/stdc++.h>
using namespace std;

int n;
typedef pair<int,int> P;
P arr[16];
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
int dir[16];
int val[16];
int meet[16][16];
int dist[16];
bool vis[16];
const int INF=1e9+7;

int main() {
    scanf("%d",&n);
    int ret=0;
    for(int i=1;i<=n;i++) {
        scanf("%d %d",&arr[i].first,&arr[i].second);
        if (arr[i].first==arr[i].second) {
            ret++;
        }
    }
    printf("%d",ret);
    return 0;
}

Compilation message

fever.cpp: In function 'int main()':
fever.cpp:17:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   17 |     scanf("%d",&n);
      |     ~~~~~^~~~~~~~~
fever.cpp:20:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   20 |         scanf("%d %d",&arr[i].first,&arr[i].second);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 1 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 1 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 1 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 1 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 1 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 1 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 1 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -