QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#455941#7276. A Light Inconvenienceksu_0 1ms3772kbC++231.6kb2024-06-27 03:23:562024-06-27 03:23:58

Judging History

你现在查看的是最新测评结果

  • [2024-06-27 03:23:58]
  • 评测
  • 测评结果:0
  • 用时:1ms
  • 内存:3772kb
  • [2024-06-27 03:23:56]
  • 提交

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;
//}

詳細信息

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

input:


output:


result: