QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#455940#7276. A Light Inconvenienceksu_0 1ms3784kbC++231.6kb2024-06-27 03:22:062024-06-27 03:22:06

Judging History

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

  • [2024-06-27 03:22:06]
  • 评测
  • 测评结果:0
  • 用时:1ms
  • 内存:3784kb
  • [2024-06-27 03:22:06]
  • 提交

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 = true;

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
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3488kb

input:

\x03

output:

1 2 4 

result:

wrong answer Security violation!

Subtask #2:

score: 0
Wrong Answer

Test #12:

score: 0
Wrong Answer
time: 1ms
memory: 3784kb

input:

\x03

output:

1 2 4 

result:

wrong answer Security violation!

Subtask #3:

score: 0
Wrong Answer

Test #24:

score: 0
Wrong Answer
time: 0ms
memory: 3720kb

input:

\x03

output:

1 2 4 

result:

wrong answer Security violation!

Subtask #4:

score: 0
Wrong Answer

Test #48:

score: 0
Wrong Answer
time: 0ms
memory: 3480kb

input:

\x03

output:

1 2 4 

result:

wrong answer Security violation!

Subtask #5:

score: 0
Wrong Answer

Test #84:

score: 0
Wrong Answer
time: 1ms
memory: 3444kb

input:

\x03

output:

1 2 4 

result:

wrong answer Security violation!

Subtask #6:

score: 0
Wrong Answer

Test #132:

score: 0
Wrong Answer
time: 1ms
memory: 3564kb

input:

\x03

output:

1 2 4 

result:

wrong answer Security violation!

Subtask #7:

score: 0
Wrong Answer

Test #192:

score: 0
Wrong Answer
time: 0ms
memory: 3424kb

input:

\x03

output:

1 2 4 

result:

wrong answer Security violation!