# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
804034 | vjudge1 | Broken Device 2 (JOI22_device2) | C++17 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "Anna.h"
#include <bits/stdc++.h>
#define pb push_back
#define f first
#define sc second
using namespace std;
typedef long long int ll;
typedef string str;
namespace {
const int m = 2000;
}
int Declare(){
return m;
}
pair<vector<int>, vector<int>> Anna(ll A){
ll s = 0;
for(int i = 1; i <= m; i++){
if(A-s >= 2*i+1){
s+=2*i+1;
continue;
}
ll c = A-s;
pair<vector<int>, vector<int>> rt;
rt.f = vector<int>(i, 0);
rt.sc = vector<int>(i, 0);
for(int j = 0; j < c; j++){
if(j < i) rt.f[j] = 1;
else rt.sc[j-i] = 1;
}
return rt;
}
return {{},{}};
}