oj mrJudge
Toggle navigation
  • Login
    • Forget Password
      Login
User Image

Hello, Stranger

Guest
  • Analysis Mode
  • Problems
    • All Problems
    • Latest Problems
  • Join Us Now
  • Registration
  • Contact Us
  • Infomation
  • About
    • Terms of Use
    • Technical Specifications
    • Credits

nostatement Batch , stdin/stdout

Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

statement.html

Rar the Cat was busy setting up student's problems that he accidentally forgot to save the problem statement of his own problem!

Furthermore, he does not have the time and effort to rewrite his own problem statement as the problems submitted contained numerous errors :P

However, he does still have a (poorly written) solution 'ans.cpp' and his testcases.

Given 'ans.cpp', your task is to solve this problem without the problem statement.

ans.cpp

#include <cstdio>
#include <algorithm>
#include <vector>
#include <set>
#include <ctime>
#include <cstdlib>
using namespace std;
#define LONGLONGMAX 1LL
#define LONGLONGMIN 0LL
typedef long long ll;
bool A(ll numberone,ll numbertwo) {
	while(numberone-numbertwo>=LONGLONGMIN) 
	for(ll numberthree=numbertwo;numberthree--;--numberone);
	return !numberone;
}
ll B(ll axe,ll why) {
	set<ll> abcdefghijk1mnopqrstuvwxyz;
	vector<ll> abcdefghijklmnopqrstuvwxyz;
	while(abcdefghijk1mnopqrstuvwxyz.size()<why) {
		ll kay=rand()%why+LONGLONGMAX;
		if (A(axe,kay)&&A(why,kay)&&abcdefghijk1mnopqrstuvwxyz.find(kay)==abcdefghijk1mnopqrstuvwxyz.end())
		abcdefghijklmnopqrstuvwxyz.push_back(kay);
		abcdefghijk1mnopqrstuvwxyz.insert(kay);
		sort(abcdefghijklmnopqrstuvwxyz.begin(),abcdefghijklmnopqrstuvwxyz.end());
		reverse(abcdefghijklmnopqrstuvwxyz.begin(),abcdefghijklmnopqrstuvwxyz.end());
	}
	abcdefghijk1mnopqrstuvwxyz.clear();
	return abcdefghijklmnopqrstuvwxyz[LONGLONGMIN];
}
bool C(ll seewhatsee) {
	bool seamonster = LONGLONGMAX;
	for (ll seamonst3r=LONGLONGMAX<<LONGLONGMAX;seamonst3r<seewhatsee;++seamonst3r)
	seamonster&=(B(seamonst3r,seewhatsee)==LONGLONGMAX);
	return seamonster;
}
int main () {
	ll tc, n, m;
	scanf("%lld", &tc);
	while (tc--) {
		scanf("%lld%lld", &n, &m);
		vector<ll> abcdefghijk1mnopqrstuvwxyz;
		for (ll abcdefghijklmnopqrstuvwxyz=LONGLONGMAX<<LONGLONGMAX;abcdefghijklmnopqrstuvwxyz<=n;++abcdefghijklmnopqrstuvwxyz) {
			if (C(abcdefghijklmnopqrstuvwxyz))abcdefghijk1mnopqrstuvwxyz.push_back(abcdefghijklmnopqrstuvwxyz);
			sort(abcdefghijk1mnopqrstuvwxyz.begin(),abcdefghijk1mnopqrstuvwxyz.end());
		}
		reverse(abcdefghijk1mnopqrstuvwxyz.begin(),abcdefghijk1mnopqrstuvwxyz.end());
		if (abcdefghijk1mnopqrstuvwxyz.size()<m)printf("%lld\n",LONGLONGMIN-LONGLONGMAX);
		else {
			for (ll abcdefghijklmnopqrstuvwxyz=LONGLONGMAX;abcdefghijklmnopqrstuvwxyz<m;++abcdefghijklmnopqrstuvwxyz)
			abcdefghijk1mnopqrstuvwxyz.erase(abcdefghijk1mnopqrstuvwxyz.begin());
			printf("%lld\n",*abcdefghijk1mnopqrstuvwxyz.begin());
		}
		abcdefghijk1mnopqrstuvwxyz.clear();
	}
}

Tags

Creative

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
1100501s32MBAverage

Judge Compile Command

g++-8 ans.cpp -o nostatement -Wall -Wshadow -static -O2 -lm -m64 -s -w -std=gnu++17 -fmax-errors=512

Accepted Submissions

subIDUserTimeMax Time

Past Submissions

subIDUserTimeScore
mrJudge 09.05.20
Copyright © 2020 mrJudge. All rights reserved.