QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#455941 | #7276. A Light Inconvenience | ksu_ | 0 | 1ms | 3772kb | C++23 | 1.6kb | 2024-06-27 03:23:56 | 2024-06-27 03:23:58 |
answer
#include <iostream>
#include <vector>
#include <string>
#include <math.h>
#include <cmath>
#include <iomanip>
#include <cstdio>
#include <algorithm>
#include <numeric>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <deque>
#include <bitset>
#include <cstring>
#include <unordered_map>
#include "light.h"
using namespace std;
typedef long long ll;
ll n = 1;
void prepare(){
}
bool const local = false;
pair<ll, vector<ll>> join(ll p){
n += p;
vector<ll> ans;
ll c = 1;
for(int i = n; i >= 1; i -= c){
ans.push_back(i);
c *= 2;
}
if(ans.back() != 1)
ans.push_back(1);
sort(ans.begin(), ans.end());
if(local){
for(auto i: ans)
cout << i << ' ';
cout << endl;
}
return {p, ans};
}
pair<ll, vector<ll>> leave(ll p){
n -= p;
vector<ll> ans;
ll c = 1;
for(int i = n; i >= 1; i -= c){
ans.push_back(i);
c *= 2;
}
if(ans.back() != 1)
ans.push_back(1);
sort(ans.begin(), ans.end());
if(local){
for(auto i: ans)
cout << i << ' ';
cout << endl;
}
return {p, ans};
}
//
//int main(){
// prepare();
//
// ll q;
// cin >> q;
//
// while(q--){
// char c;
// ll p;
//
// cin >> c >> p;
//
// if(c == 'j'){
// join(p);
// }
// else{
// leave(p);
// }
// }
//
// return 0;
//}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 0
Runtime Error
Test #1:
score: 5
Accepted
time: 0ms
memory: 3772kb
input:
\x03
output:
result:
ok Correct
Test #2:
score: -5
Runtime Error
input:
output:
result:
Subtask #2:
score: 0
Wrong Answer
Test #12:
score: 5
Accepted
time: 1ms
memory: 3616kb
input:
\x03
output:
result:
ok Correct
Test #13:
score: -5
Wrong Answer
time: 1ms
memory: 3600kb
input:
!\x02
output:
result:
wrong answer Not correct
Subtask #3:
score: 0
Wrong Answer
Test #24:
score: 10
Accepted
time: 0ms
memory: 3604kb
input:
\x03
output:
result:
ok Correct
Test #25:
score: -10
Wrong Answer
time: 0ms
memory: 3540kb
input:
!\x02
output:
result:
wrong answer Not correct
Subtask #4:
score: 0
Wrong Answer
Test #48:
score: 5
Accepted
time: 0ms
memory: 3768kb
input:
\x03
output:
result:
ok Correct
Test #49:
score: -5
Wrong Answer
time: 1ms
memory: 3608kb
input:
!\x02
output:
result:
wrong answer Not correct
Subtask #5:
score: 0
Wrong Answer
Test #84:
score: 10
Accepted
time: 0ms
memory: 3600kb
input:
\x03
output:
result:
ok Correct
Test #85:
score: -10
Wrong Answer
time: 0ms
memory: 3600kb
input:
!\x02
output:
result:
wrong answer Not correct
Subtask #6:
score: 0
Wrong Answer
Test #132:
score: 5
Accepted
time: 1ms
memory: 3540kb
input:
\x03
output:
result:
ok Correct
Test #133:
score: -5
Wrong Answer
time: 1ms
memory: 3608kb
input:
!\x02
output:
result:
wrong answer Not correct
Subtask #7:
score: 0
Runtime Error
Test #192:
score: 60
Accepted
time: 1ms
memory: 3484kb
input:
\x03
output:
result:
ok Correct
Test #193:
score: 0
Runtime Error