Submission #1116945

# Submission time Handle Problem Language Result Execution time Memory
1116945 2024-11-22T16:14:05 Z Trisanu_Das Lasers (NOI19_lasers) C++17
0 / 100
18 ms 1608 KB
#include <bits/stdc++.h>
using namespace std;

signed main(){
    cin.tie(0)->sync_with_stdio(0);
    int l, r; cin >> l >> r;
    while(r--){
        int x; cin >> x;
        while(x--){
            int n; cin >> n;
            if(n * 2 <= l) cout << "0\n";
            else if(n == l) cout << "1\n";
            else  cout << n * 2 - l << '\n';
        }
    }
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 336 KB Output is correct
2 Incorrect 1 ms 456 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 336 KB Output is correct
2 Incorrect 1 ms 456 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 18 ms 1608 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 336 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 18 ms 1608 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 336 KB Output is correct
2 Incorrect 1 ms 456 KB Output isn't correct
3 Halted 0 ms 0 KB -