Submission #1007711

# Submission time Handle Problem Language Result Execution time Memory
1007711 2024-06-25T11:16:53 Z makanhulia Lasers (NOI19_lasers) C++17
0 / 100
10 ms 348 KB
#include <bits/stdc++.h>
using namespace std; 
#define int long long
#define ld long double
#define fi first 
#define se second 
#define pb push_back
#define pii pair<int,int>
#define piii pair<pair<int,int>,pair<int,int>>
#define pip pair<int,pair<int,int>>

signed main(){
    ios_base::sync_with_stdio(false); 
    cin.tie(NULL); 
    cout.tie(NULL); 
    int n, q; cin >> n >> q; 
    int val = 0; 
    for(int i = 1; i <= q; i++){
        int x; cin >> x; 
        int tmp = 0; 
        for(int i = 1; i <= x; i++){
            int a; cin >> a; val = max(val,a);  
        }
    }
    cout << val - (n - val + 1) + 1 << endl; 
}

Compilation message

lasers.cpp: In function 'int main()':
lasers.cpp:20:13: warning: unused variable 'tmp' [-Wunused-variable]
   20 |         int tmp = 0;
      |             ^~~
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 10 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 10 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -