QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#439113#7276. A Light InconvenienceA_zjzj#0 2ms3800kbC++17910b2024-06-11 16:20:302024-06-11 16:20:31

Judging History

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

  • [2024-06-11 16:20:31]
  • 评测
  • 测评结果:0
  • 用时:2ms
  • 内存:3800kb
  • [2024-06-11 16:20:30]
  • 提交

answer

#include"light.h"
#include<bits/stdc++.h>
using namespace std;
#ifdef DEBUG
#include"debug.h"
#else
#define debug(...) void()
#endif
#define all(x) (x).begin(),(x).end()
template<class T>
auto ary(T *a,int l,int r){
	return vector<T>{a+l,a+1+r};
}
using ll=long long;
using ull=unsigned ll;
ll n;
vector<ll>a;
void prepare(){
	n=1,a={1};
}
vector<ll> trs(){
	sort(all(a));
	a.erase(unique(all(a)),a.end());
	auto res(a);
	reverse(all(res));
	for(ll &x:res)x=n+1-x;
	return res;
}
pair<ll,vector<ll>> join(ll x){
	n+=x;
	if(a.back()*2+1<n)a.push_back(a.back()*2+1);
	a.push_back(n);
	return {x,trs()};
}
pair<ll,vector<ll>> leave(ll x){
	vector<ll>b{1};
	n-=x;
	for(int p=0;b.back()*2+1<n;){
		for(;p+1<a.size()&&a[p+1]<=b.back()*2+1;p++);
		b.push_back(min(b.back()*2+1,a[p]+x));
	}
	a=b,a.push_back(n);
	return {x,trs()};
}
#ifdef DEBUG
#include"debug.hpp"
#endif

详细

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 5
Accepted
time: 1ms
memory: 3596kb

input:

\x03

output:


result:

ok Correct

Test #2:

score: -5
Wrong Answer
time: 2ms
memory: 3500kb

input:


output:


result:

wrong answer Not correct

Subtask #2:

score: 0
Memory Limit Exceeded

Test #12:

score: 5
Accepted
time: 0ms
memory: 3800kb

input:

\x03

output:


result:

ok Correct

Test #13:

score: -5
Memory Limit Exceeded

input:

!\x02

output:


result:


Subtask #3:

score: 0
Memory Limit Exceeded

Test #24:

score: 10
Accepted
time: 0ms
memory: 3580kb

input:

\x03

output:


result:

ok Correct

Test #25:

score: -10
Memory Limit Exceeded

input:

!\x02

output:


result:


Subtask #4:

score: 0
Memory Limit Exceeded

Test #48:

score: 5
Accepted
time: 1ms
memory: 3592kb

input:

\x03

output:


result:

ok Correct

Test #49:

score: -5
Memory Limit Exceeded

input:

!\x02

output:


result:


Subtask #5:

score: 0
Memory Limit Exceeded

Test #84:

score: 10
Accepted
time: 0ms
memory: 3736kb

input:

\x03

output:


result:

ok Correct

Test #85:

score: -10
Memory Limit Exceeded

input:

!\x02

output:


result:


Subtask #6:

score: 0
Memory Limit Exceeded

Test #132:

score: 5
Accepted
time: 1ms
memory: 3772kb

input:

\x03

output:


result:

ok Correct

Test #133:

score: -5
Memory Limit Exceeded

input:

!\x02

output:


result:


Subtask #7:

score: 0
Wrong Answer

Test #192:

score: 60
Accepted
time: 0ms
memory: 3568kb

input:

\x03

output:


result:

ok Correct

Test #193:

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

input:


output:


result:

wrong answer Not correct