# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
965972 | 2024-04-19T08:53:31 Z | nam_ntmp | Lasers (NOI19_lasers) | C++17 | 0 ms | 0 KB |
#include <bits/stdc++.h> using namespace std; int main(){ int l,r; cin>>l>>r; // sub 1 while(r--){ int X; cin>>X; while(X--){ int len; cin>>len; if(len*2 < l){ cout<<"0\n"; // } else if(len == l){ // cout<<l<<"\n"; // } else { cout<<(len*2)+1-l<<"\n"; } } } } /* 10 1 1 4 10 1 1 5 */