Submission #804050

# Submission time Handle Problem Language Result Execution time Memory
804050 2023-08-03T06:58:32 Z 반딧불(#10100) Fun Palace (CCO18_fun) C++17
0 / 25
1 ms 212 KB
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

int n, e;
int a[1002], b[1002];

int main(){
    scanf("%d %d", &n, &e);
    for(int i=1; i<n; i++) scanf("%d %d", &a[i], &b[i]);
    printf("%d", e-1 + max(0, n-1)/2);
}

Compilation message

Main.cpp: In function 'int main()':
Main.cpp:11:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   11 |     scanf("%d %d", &n, &e);
      |     ~~~~~^~~~~~~~~~~~~~~~~
Main.cpp:12:33: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   12 |     for(int i=1; i<n; i++) scanf("%d %d", &a[i], &b[i]);
      |                            ~~~~~^~~~~~~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 1 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory 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 -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 1 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 1 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -