| Task: | Distances |
| Sender: | Luisito0101 |
| Submission time: | 2026-04-17 10:53:37 +0300 |
| Language: | C++ (C++17) |
| Status: | READY |
| Result: | 32 |
| subtask | verdict | score |
|---|---|---|
| #1 | WRONG ANSWER | 0 |
| #2 | ACCEPTED | 4 |
| #3 | ACCEPTED | 6 |
| #4 | WRONG ANSWER | 0 |
| #5 | ACCEPTED | 22 |
| #6 | WRONG ANSWER | 0 |
| test | verdict | time | subtask | |
|---|---|---|---|---|
| #1 | WRONG ANSWER | 0.00 s | 1, 4, 6 | details |
| #2 | ACCEPTED | 0.00 s | 1, 2, 3, 4, 5, 6 | details |
| #3 | ACCEPTED | 0.00 s | 1, 3, 4, 5, 6 | details |
| #4 | ACCEPTED | 0.00 s | 1, 2, 4, 6 | details |
| #5 | ACCEPTED | 0.00 s | 1, 3, 4, 5, 6 | details |
| #6 | ACCEPTED | 0.00 s | 1, 4, 6 | details |
| #7 | WRONG ANSWER | 0.00 s | 1, 4, 6 | details |
| #8 | ACCEPTED | 0.00 s | 1, 2, 4, 6 | details |
| #9 | ACCEPTED | 0.00 s | 1, 3, 4, 5, 6 | details |
| #10 | ACCEPTED | 0.00 s | 1, 4, 5, 6 | details |
| #11 | ACCEPTED | 0.00 s | 1, 4, 6 | details |
| #12 | ACCEPTED | 0.00 s | 1, 4, 6 | details |
| #13 | WRONG ANSWER | 0.00 s | 1, 4, 6 | details |
| #14 | WRONG ANSWER | 0.00 s | 1, 6 | details |
| #15 | ACCEPTED | 0.00 s | 1, 2, 6 | details |
| #16 | WRONG ANSWER | 0.00 s | 4, 6 | details |
| #17 | WRONG ANSWER | 0.00 s | 4, 6 | details |
| #18 | ACCEPTED | 0.00 s | 3, 4, 5, 6 | details |
| #19 | ACCEPTED | 0.00 s | 4, 5, 6 | details |
| #20 | ACCEPTED | 0.00 s | 4, 5, 6 | details |
| #21 | ACCEPTED | 0.00 s | 5, 6 | details |
| #22 | ACCEPTED | 0.00 s | 5, 6 | details |
| #23 | ACCEPTED | 0.00 s | 2, 6 | details |
| #24 | ACCEPTED | 0.00 s | 3, 4, 5, 6 | details |
| #25 | ACCEPTED | 0.00 s | 4, 5, 6 | details |
| #26 | ACCEPTED | 0.00 s | 4, 5, 6 | details |
| #27 | ACCEPTED | 0.00 s | 5, 6 | details |
| #28 | ACCEPTED | 0.00 s | 5, 6 | details |
| #29 | ACCEPTED | 0.00 s | 2, 6 | details |
| #30 | ACCEPTED | 0.00 s | 3, 4, 5, 6 | details |
| #31 | ACCEPTED | 0.00 s | 4, 5, 6 | details |
| #32 | ACCEPTED | 0.00 s | 4, 5, 6 | details |
| #33 | ACCEPTED | 0.00 s | 4, 5, 6 | details |
| #34 | ACCEPTED | 0.00 s | 5, 6 | details |
| #35 | ACCEPTED | 0.00 s | 5, 6 | details |
| #36 | ACCEPTED | 0.00 s | 5, 6 | details |
| #37 | ACCEPTED | 0.00 s | 6 | details |
| #38 | WRONG ANSWER | 0.00 s | 6 | details |
| #39 | ACCEPTED | 0.00 s | 2, 6 | details |
| #40 | WRONG ANSWER | 0.00 s | 6 | details |
| #41 | WRONG ANSWER | 0.00 s | 6 | details |
| #42 | WRONG ANSWER | 0.00 s | 6 | details |
| #43 | WRONG ANSWER | 0.00 s | 6 | details |
| #44 | WRONG ANSWER | 0.00 s | 6 | details |
Code
//I love my template
#include <bits/extc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#define int long long
//Constant Values
const int mod=998244353;
const int inf=INT64_MAX;
const int oo=1e18;
const double pi=acos(-1);
//Utilities
#define opt ios_base::sync_with_stdio(0),cin.tie(0);cout.tie(0)
#define tests int testcases;cin>>testcases;while(testcases--)
#define vec vector
#define vii vec<int>
#define pii pair<int,int>
#define fi first
#define se second
#define deb cerr<<"."<<endl
#define inv(x) qp(x,mod-2)
#define all(x) x.begin(),x.end()
#define srt(x) sort(all(x))
#define rev(x) reverse(all(x))
#define left u<<1,l,(l+r)>>1
#define right (u<<1)|1,((l+r)>>1)+1,r
//ERRORS
vii testvec;
#define WA return 0;
#define RTE testvec[2]=1;
#define TLE while(1){}
#define OLE while(1){cout<<".\n";}
int get(){int x;cin>>x;return x;}
typedef __gnu_pbds::tree<pii,__gnu_pbds::null_type,less<pii>,__gnu_pbds::rb_tree_tag,__gnu_pbds::tree_order_statistics_node_update>ordered_set;
//Math
vec<int>fact;
vec<int>inverse;
vec<int>catalan;
int qp(int a,int b){
if(!b)return 1;
return (qp((a*a)%mod,b>>1)*(b&1?a:1))%mod;
}
int qpmod(int a,int b,int md){
if(!b)return 1;
return (qpmod((a*a)%md,b>>1,md)*(b&1?a:1))%md;
}
__int128 qp128(__int128 a,__int128 b){
if(!b)return 1;
return (qp128((a*a)%mod,b>>1)*(b&1?a:1))%mod;
}
int phi(int n){
int ans=n;
for(int i=2;i*i<=n;i++){
if(n%i==0){
while(n%i==0){
n/=i;
}
ans-=ans/i;
}
}
if(n>1)ans-=ans/n;
return ans;
}
int gcd(int a,int b){
return b?gcd(b,a%b):a;
}
int lcm(int a,int b){
return (a/gcd(a,b))*b;
}
int gauss(int n){
return (n*(n+1))/2;
}
int dig(int n){
if(n==0)return 1;
int ans=1;
while(n/=10)ans++;
return ans;
}
void DO_MATH(int MAXN){
fact.push_back(1);
inverse.push_back(1);
catalan.push_back(1);
for(int i=1;i<=MAXN;i++){
fact.push_back((fact[i-1]*i)%mod);
inverse.push_back(qp(fact[i],mod-2));
catalan.push_back((((catalan[i-1]*(4*i-2))%mod)*qp(i+1,mod-2))%mod);
}
}
int C(const int& n,const int& k){
return (((fact[n]*inverse[n-k])%mod)*inverse[k])%mod;
}
int Euler(const int& n,const int& k){
int ans=0;
for(int i=0;i<=k;i++){
int sum=(C(n+1,i)*qp(k+1-i,n))%mod;
if(i%2==0)ans+=sum;
else ans-=sum;
}
return (ans%mod+mod)%mod;
}
map<int,int>fibonac;
int fib(int n){
if(n==0)return 0;
if(n==1||n==2)return 1;
if(fibonac[n]!=0)return fibonac[n];
int a=n/2,b=n/2+n%2;
return fibonac[n]=(((fib(b-1)*fib(a))%mod)+((fib(a+1)*fib(b))%mod))%mod;
}
//Binary Search algorithms
int lbound(const vector<int>& v,const int& val){
int l=0,r=v.size()-1,ans=0,mid;
while(l<=r){
mid=(l+r)/2;
if(v[mid]<=val){
ans=v[mid];
l=mid+1;
}
else r=mid-1;
}
return ans;
}
//Number Handle
string tostr(int n){
string ans;
do{
ans+=n%10+48;
}while(n/=10);
rev(ans);
return ans;
}
void cout_128(__int128 n){
if(n<0){
n=-n;cout<<'-';
}
string s;
do{
s+=(char)((n%10)+'0');
}while(n/=10);
rev(s);
cout<<s;
}
//SegTree Configurations
constexpr int crash_val=0;
int merge(const int& l,const int& r){
return l+r;
}
//SegTree
struct SegTree{
vii ar;
vii tree;
SegTree(){}
//Constructor
SegTree(const int& n){
ar.assign(n+1,crash_val);
tree.assign((n<<2)|1,crash_val);
}
//Inicialization
void build(const int& u,const int& l,const int& r){
if(l==r){
tree[u]=ar[l];
return;
}
const int mid=(l+r)>>1;
build(u<<1,l,mid);
build((u<<1)|1,mid+1,r);
tree[u]=merge(tree[u<<1],tree[(u<<1)|1]);
}
//Query
int query(const int& u,const int& l,const int& r,const int& ql,const int& qr){
if(l>qr||r<ql)return crash_val;
if(l>=ql&&r<=qr)return tree[u];
const int mid=(l+r)>>1;
return merge(query(u<<1,l,mid,ql,qr),query((u<<1)|1,mid+1,r,ql,qr));
}
//Update
void update(const int& u,const int& l,const int& r,const int& pos,const int& k){
if(l>pos||r<pos)return;
if(l==r){
ar[l]=k;
tree[u]=ar[l];
return;
}
const int mid=(l+r)>>1;
update(u<<1,l,mid,pos,k);
update((u<<1)|1,mid+1,r,pos,k);
tree[u]=merge(tree[u<<1],tree[(u<<1)|1]);
}
};
//Lazy Update
constexpr int def_lazy_val=0;
struct SegTreeLazy{
vii ar;
vii tree;
vii lazy;
SegTreeLazy(){}
//Constructor
SegTreeLazy(const int& n){
ar.assign(n+1,crash_val);
tree.assign((n<<2)|1,crash_val);
lazy.assign((n<<2)|1,def_lazy_val);
}
//Inicialization
void build(const int& u,const int& l,const int& r){
if(l==r){
tree[u]=ar[l];
lazy[u]=def_lazy_val;
return;
}
const int mid=(l+r)>>1;
build(u<<1,l,mid);
build((u<<1)|1,mid+1,r);
tree[u]=merge(tree[u<<1],tree[(u<<1)|1]);
lazy[u]=def_lazy_val;
}
//Push Lazy Val
void push(const int& u,const int& l,const int& r){
if(lazy[u]==def_lazy_val)return;
tree[u]+=lazy[u]*(r-l+1);
if(l!=r){
lazy[u<<1]+=lazy[u];
lazy[(u<<1)|1]+=lazy[u];
}
lazy[u]=def_lazy_val;
}
//Range Query
int query(const int& u,const int& l,const int& r,const int& ql,const int& qr){
push(u,l,r);
if(l>=ql&&r<=qr)return tree[u];
if(l>qr||r<ql)return crash_val;
const int mid=(l+r)>>1;
return merge(query(u<<1,l,mid,ql,qr),query((u<<1)|1,mid+1,r,ql,qr));
}
//Range Update
void update(const int& u,const int& l,const int& r,const int& a,const int& b,const int& k){
push(u,l,r);
if(l>b||r<a)return;
if(l>=a&&r<=b){
lazy[u]+=k;
push(u,l,r);
return;
}
const int mid=(l+r)>>1;
update(u<<1,l,mid,a,b,k);
update((u<<1)|1,mid+1,r,a,b,k);
tree[u]=merge(tree[u<<1],tree[(u<<1)|1]);
}
};
//Disjoint Set Union
struct DSU{
vii parent,siz;
int comp;
//Constructor
DSU(const int& n):comp(n){
parent.resize(n+1);
iota(all(parent),0);
siz.assign(n+1,1);
}
//Find
int find(const int& u){
if(parent[u]==u)return u;
return parent[u]=find(parent[u]);
}
//Unite
void unite(const int& u,const int& v){
int pu=find(u);
int pv=find(v);
if(pu==pv)return;
if(siz[pu]>siz[pv])swap(pu,pv);
parent[pu]=pv;
siz[pv]+=siz[pu];
comp--;
}
//Same Component Check
bool same(const int& u,const int& v){
return find(u)==find(v);
}
//Size Of Component
int size(const int& u){
return siz[find(u)];
}
};
//DSU with rollback
struct DSUrollback{
vii parent,siz;
stack<tuple<int,int,int> >hist;
int comp;
//Constructor
DSUrollback():comp(0){}
DSUrollback(const int& n):comp(n){
parent.resize(n+1);
iota(all(parent),0);
siz.assign(n+1,1);
}
//Find
int find(int n){
while(n!=parent[n])n=parent[n];
return n;
}
//Unite
bool unite(const int& u,const int& v){
int pu=find(u);
int pv=find(v);
if(pu==pv)return 0;
if(siz[pu]<siz[pv])swap(pu,pv);
hist.push({pu,pv,siz[pu]});
parent[pv]=pu;
siz[pu]+=siz[pv];
comp--;
return 1;
}
//Undo last union
void undo(){
auto[pu,pv,szpu]=hist.top();
hist.pop();
parent[pv]=pv;
siz[pu]=szpu;
comp++;
}
//Same Component Check
bool same(const int& u,const int& v){
return find(u)==find(v);
}
//Size Of Component
int size(const int&u){
return siz[find(u)];
}
};
//Hashing
//Multiple Hash Value Storing
struct HashVal{
int h0,h1,h2,h3,h4,h5;
bool operator == (const HashVal& val){
return h0==val.h0&&h1==val.h1&&h2==val.h2&&h3==val.h3&&h4==val.h4&&h5==val.h5;
}
};
//VERY strong Hashing
struct Hashing{
vii hash[6];
vii pot[6];
Hashing(){}
//Constructor
Hashing(const string& s){
for(int i=0;i<6;i++){
hash[i].assign(s.size()+1,0);
pot[i].assign(s.size()+1,1);
}
for(int i=1;i<=(int)s.size();i++){
hash[0][i]=(hash[0][i-1]*31+s[i-1])%1000000007;
hash[1][i]=(hash[1][i-1]*37+s[i-1])%1000000007;
hash[2][i]=(hash[2][i-1]*41+s[i-1])%1000000007;
hash[3][i]=(hash[3][i-1]*31+s[i-1])%1000000009;
hash[4][i]=(hash[4][i-1]*37+s[i-1])%1000000009;
hash[5][i]=(hash[5][i-1]*41+s[i-1])%1000000009;
pot[0][i]=(pot[0][i-1]*31)%1000000007;
pot[1][i]=(pot[1][i-1]*37)%1000000007;
pot[2][i]=(pot[2][i-1]*41)%1000000007;
pot[3][i]=(pot[3][i-1]*31)%1000000009;
pot[4][i]=(pot[4][i-1]*37)%1000000009;
pot[5][i]=(pot[5][i-1]*41)%1000000009;
}
}
//Get Val From Range
HashVal get(const int& l,const int& r){
HashVal ans;
ans.h0=((hash[0][r]-((hash[0][l-1]*pot[0][r-l+1])%1000000007))+1000000007)%1000000007;
ans.h1=((hash[1][r]-((hash[1][l-1]*pot[1][r-l+1])%1000000007))+1000000007)%1000000007;
ans.h2=((hash[2][r]-((hash[2][l-1]*pot[2][r-l+1])%1000000007))+1000000007)%1000000007;
ans.h3=((hash[3][r]-((hash[3][l-1]*pot[3][r-l+1])%1000000009))+1000000009)%1000000009;
ans.h4=((hash[4][r]-((hash[4][l-1]*pot[4][r-l+1])%1000000009))+1000000009)%1000000009;
ans.h5=((hash[5][r]-((hash[5][l-1]*pot[5][r-l+1])%1000000009))+1000000009)%1000000009;
return ans;
}
};
//Checking Palindromes easily
struct PalHash{
const int n;
Hashing normal,revers;
PalHash(string s):n((int)s.size()){
normal=Hashing(s);
rev(s);
revers=Hashing(s);
}
HashVal get(const int& l,const int& r){
return normal.get(l,r);
}
bool pal(const int& l,const int& r){
return normal.get(l,r)==revers.get(n-r+1,n-l+1);
}
};
//Hashing with updates (WHY)
const int md1=1e9+7,md2=1e9+9,md3=1e9+21,md4=1e9+33;
vii p1,p2,p3,p4,i1,i2,i3,i4;
void precomp(const int& MXN){
p1.push_back(1);i1.push_back(1);
p2.push_back(1);i2.push_back(1);
p3.push_back(1);i3.push_back(1);
p4.push_back(1);i4.push_back(1);
for(int i=1;i<=MXN;i++){
p1.push_back((p1[i-1]*131LL)%md1);
p2.push_back((p2[i-1]*131LL)%md2);
p3.push_back((p3[i-1]*131LL)%md3);
p4.push_back((p4[i-1]*131LL)%md4);
i1.push_back((qpmod(p1[i],md1-2,md1)));
i2.push_back((qpmod(p2[i],md2-2,md2)));
i3.push_back((qpmod(p3[i],md3-2,md3)));
i4.push_back((qpmod(p4[i],md4-2,md4)));
}
}
struct Node{
int val1,val2,val3,val4;
Node():val1(0),val2(0),val3(0),val4(0){}
Node(const char& c,const int& pos){
val1=(p1[pos]*(int)c)%md1;
val2=(p2[pos]*(int)c)%md2;
val3=(p3[pos]*(int)c)%md3;
val4=(p4[pos]*(int)c)%md4;
}
Node(const Node& l,const Node& r){
val1=(l.val1+r.val1)%md1;
val2=(l.val2+r.val2)%md2;
val3=(l.val3+r.val3)%md3;
val4=(l.val4+r.val4)%md4;
}
bool operator == (const Node& x){
return val1==x.val1&&val2==x.val2&&val3==x.val3&&val4==x.val4;
}
};
struct HashUpdate{
string str;
vec<Node>arr,tree;
HashUpdate(){}
HashUpdate(const string s){
str=s;
arr.resize(str.size()+1);
tree.resize((str.size()<<2)|1);
for(int i=1;i<=(int)str.size();i++){
arr[i]=Node(str[i-1],i);
}
}
void build(const int& u,const int& l,const int& r){
if(l==r){
tree[u]=arr[l];
return;
}
build(left);
build(right);
tree[u]=Node(tree[u<<1],tree[(u<<1)|1]);
}
void update(const int& u,const int& l,const int& r,const int& pos,const char& val){
if(l>pos||r<pos)return;
if(l==r){
arr[l]=Node(val,l);
tree[u]=arr[l];
return;
}
update(left,pos,val);
update(right,pos,val);
tree[u]=Node(tree[u<<1],tree[(u<<1)|1]);
}
Node query(const int& u,const int& l,const int& r,const int& a,const int& b){
if(l>b||r<a)return Node();
if(l>=a&&r<=b)return tree[u];
return Node(query(left,a,b),query(right,a,b));
}
Node get(const int& l,const int& r){
Node n=query(1,1,str.size(),l,r);
n.val1=(n.val1*i1[l-1])%md1;
n.val2=(n.val2*i2[l-1])%md2;
n.val3=(n.val3*i3[l-1])%md3;
n.val4=(n.val4*i4[l-1])%md4;
return n;
}
};
struct PalHashUpdate{
HashUpdate normal,revers;
int MX;
PalHashUpdate(string s){
normal=HashUpdate(s);
rev(s);
revers=HashUpdate(s);
MX=s.size();
normal.build(1,1,MX);
revers.build(1,1,MX);
}
void update(const int& pos,const char& val){
normal.update(1,1,MX,pos,val);
revers.update(1,1,MX,MX-pos+1,val);
}
bool pal(const int& l,const int& r){
return normal.get(l,r)==revers.get(MX-r+1,MX-l+1);
}
};
//Trie
struct Trie{
struct Nod{
int pref,word;
unordered_map<char,int>m;
Nod():pref(0),word(0){}
};
vec<Nod>v;
Trie(){
v.push_back(Nod());
}
void insert(string &s){
int act=0;
for(char c:s){
if(v[act].m[c]==0){
v[act].m[c]=v.size();
v.push_back(Nod());
}
act=v[act].m[c];
v[act].pref++;
}
v[act].word++;
}
void erase(string &s){
int act=0;
for(char c:s){
act=v[act].m[c];
v[act].pref--;
}
v[act].word--;
}
int pref(string &s){
int act=0;
for(char c:s){
if(v[act].m[c]==0){
return 0;
}
act=v[act].m[c];
}
return v[act].pref;
}
int word(string &s){
int act=0;
for(char c:s){
if(v[act].m[c]==0){
return 0;
}
act=v[act].m[c];
}
return v[act].word;
}
};
bool count(int x1,int y1,int x2,int y2){
double a=x1;
double b=y1;
double c=x2;
double d=y2;
double res=sqrt((a-b)*(a-b)+(c-d)*(c-d));
return res==floor(res);
}
int32_t main(){
int n,k;
cin>>n>>k;
if(k==(n*(n-1))/2){
for(int i=1;i<=n;i++){
cout<<1<<' '<<i<<endl;
}
return 0;
}
if(k==0){
int idx=0;
for(int i=1;i<=n;i++){
if(i%2==0)idx-=i*i;
else idx+=i*i;
cout<<i<<' '<<idx<<endl;
}
return 0;
}
int put=0; //intput XD
int liney=1;
for(int i=1;i<=n;i++){
if(k-((put*(put+1))/2)>=0)put++;
else{
k-=((put*(put-1))/2);
put=1;
liney+=i*i;
}
cout<<liney<<' '<<i<<endl;
}
}Test details
Test 1
Subtask: 1, 4, 6
Verdict: WRONG ANSWER
| input |
|---|
| 3 2 |
| correct output |
|---|
| 1 1 1 2 2 2 |
| user output |
|---|
| 1 1 1 2 10 3 |
Test 2
Subtask: 1, 2, 3, 4, 5, 6
Verdict: ACCEPTED
| input |
|---|
| 1 0 |
| correct output |
|---|
| 1 0 |
| user output |
|---|
| 1 1 |
Test 3
Subtask: 1, 3, 4, 5, 6
Verdict: ACCEPTED
| input |
|---|
| 2 0 |
| correct output |
|---|
| 1 0 804289383 846930886 |
| user output |
|---|
| 1 1 2 -3 |
Test 4
Subtask: 1, 2, 4, 6
Verdict: ACCEPTED
| input |
|---|
| 2 1 |
| correct output |
|---|
| 1 0 2 0 |
| user output |
|---|
| 1 1 1 2 |
Test 5
Subtask: 1, 3, 4, 5, 6
Verdict: ACCEPTED
| input |
|---|
| 3 0 |
| correct output |
|---|
| 1 0 804289383 846930886 681692777 714636915 |
| user output |
|---|
| 1 1 2 -3 3 6 |
Test 6
Subtask: 1, 4, 6
Verdict: ACCEPTED
| input |
|---|
| 3 1 |
| correct output |
|---|
| 1 0 2 0 804289383 846930886 |
| user output |
|---|
| 1 1 1 2 10 3 |
Test 7
Subtask: 1, 4, 6
Verdict: WRONG ANSWER
| input |
|---|
| 3 2 |
| correct output |
|---|
| 1 1 1 2 2 2 |
| user output |
|---|
| 1 1 1 2 10 3 |
Test 8
Subtask: 1, 2, 4, 6
Verdict: ACCEPTED
| input |
|---|
| 3 3 |
| correct output |
|---|
| 1 0 2 0 3 0 |
| user output |
|---|
| 1 1 1 2 1 3 |
Test 9
Subtask: 1, 3, 4, 5, 6
Verdict: ACCEPTED
| input |
|---|
| 4 0 |
| correct output |
|---|
| 1 0 804289383 846930886 681692777 714636915 957747793 424238335 |
| user output |
|---|
| 1 1 2 -3 3 6 4 -10 |
Test 10
Subtask: 1, 4, 5, 6
Verdict: ACCEPTED
| input |
|---|
| 4 1 |
| correct output |
|---|
| 1 0 2 0 804289383 846930886 681692777 714636915 |
| user output |
|---|
| 1 1 1 2 10 3 26 4 |
Test 11
Subtask: 1, 4, 6
Verdict: ACCEPTED
| input |
|---|
| 4 2 |
| correct output |
|---|
| 21392 0 1 0 0 510510 804289383 846930886 |
| user output |
|---|
| 1 1 1 2 10 3 10 4 |
Test 12
Subtask: 1, 4, 6
Verdict: ACCEPTED
| input |
|---|
| 4 3 |
| correct output |
|---|
| 1 0 2 0 3 0 804289383 846930886 |
| user output |
|---|
| 1 1 1 2 1 3 17 4 |
Test 13
Subtask: 1, 4, 6
Verdict: WRONG ANSWER
| input |
|---|
| 4 4 |
| correct output |
|---|
| 21392 0 1 0 2 0 0 510510 |
| user output |
|---|
| 1 1 1 2 1 3 17 4 |
Test 14
Subtask: 1, 6
Verdict: WRONG ANSWER
| input |
|---|
| 4 5 |
| correct output |
|---|
| 21392 0 22600 0 1 0 0 510510 |
| user output |
|---|
| 1 1 1 2 1 3 17 4 |
Test 15
Subtask: 1, 2, 6
Verdict: ACCEPTED
| input |
|---|
| 4 6 |
| correct output |
|---|
| 1 0 2 0 3 0 4 0 |
| user output |
|---|
| 1 1 1 2 1 3 1 4 |
Test 16
Subtask: 4, 6
Verdict: WRONG ANSWER
| input |
|---|
| 5 5 |
| correct output |
|---|
| 21392 0 22600 0 1 0 0 510510 804289383 846930886 |
| user output |
|---|
| 1 1 1 2 1 3 17 4 17 5 |
Test 17
Subtask: 4, 6
Verdict: WRONG ANSWER
| input |
|---|
| 6 5 |
| correct output |
|---|
| 21392 0 22600 0 1 0 0 510510 804289383 846930886 ... |
| user output |
|---|
| 1 1 1 2 1 3 17 4 17 5 ... |
Test 18
Subtask: 3, 4, 5, 6
Verdict: ACCEPTED
| input |
|---|
| 98 0 |
| correct output |
|---|
| 1 0 804289383 846930886 681692777 714636915 957747793 424238335 719885386 649760492 ... |
| user output |
|---|
| 1 1 2 -3 3 6 4 -10 5 15 ... |
Test 19
Subtask: 4, 5, 6
Verdict: ACCEPTED
| input |
|---|
| 98 97 |
| correct output |
|---|
| 21392 0 22600 0 30056 0 34848 0 38584 0 ... |
| user output |
|---|
| 1 1 1 2 1 3 1 4 1 5 ... |
Test 20
Subtask: 4, 5, 6
Verdict: ACCEPTED
| input |
|---|
| 98 98 |
| correct output |
|---|
| 21392 0 22600 0 30056 0 34848 0 38584 0 ... |
| user output |
|---|
| 1 1 1 2 1 3 1 4 1 5 ... |
Test 21
Subtask: 5, 6
Verdict: ACCEPTED
| input |
|---|
| 98 1185 |
| correct output |
|---|
| 21392 0 22600 0 30056 0 34848 0 38584 0 ... |
| user output |
|---|
| 1 1 1 2 1 3 1 4 1 5 ... |
Test 22
Subtask: 5, 6
Verdict: ACCEPTED
| input |
|---|
| 98 1188 |
| correct output |
|---|
| 21392 0 22600 0 30056 0 34848 0 38584 0 ... |
| user output |
|---|
| 1 1 1 2 1 3 1 4 1 5 ... |
Test 23
Subtask: 2, 6
Verdict: ACCEPTED
| input |
|---|
| 98 4753 |
| correct output |
|---|
| 1 0 2 0 3 0 4 0 5 0 ... |
| user output |
|---|
| 1 1 1 2 1 3 1 4 1 5 ... |
Test 24
Subtask: 3, 4, 5, 6
Verdict: ACCEPTED
| input |
|---|
| 99 0 |
| correct output |
|---|
| 1 0 804289383 846930886 681692777 714636915 957747793 424238335 719885386 649760492 ... |
| user output |
|---|
| 1 1 2 -3 3 6 4 -10 5 15 ... |
Test 25
Subtask: 4, 5, 6
Verdict: ACCEPTED
| input |
|---|
| 99 98 |
| correct output |
|---|
| 21392 0 22600 0 30056 0 34848 0 38584 0 ... |
| user output |
|---|
| 1 1 1 2 1 3 1 4 1 5 ... |
Test 26
Subtask: 4, 5, 6
Verdict: ACCEPTED
| input |
|---|
| 99 99 |
| correct output |
|---|
| 21392 0 22600 0 30056 0 34848 0 38584 0 ... |
| user output |
|---|
| 1 1 1 2 1 3 1 4 1 5 ... |
Test 27
Subtask: 5, 6
Verdict: ACCEPTED
| input |
|---|
| 99 1201 |
| correct output |
|---|
| 21392 0 22600 0 30056 0 34848 0 38584 0 ... |
| user output |
|---|
| 1 1 1 2 1 3 1 4 1 5 ... |
Test 28
Subtask: 5, 6
Verdict: ACCEPTED
| input |
|---|
| 99 1212 |
| correct output |
|---|
| 21392 0 22600 0 30056 0 34848 0 38584 0 ... |
| user output |
|---|
| 1 1 1 2 1 3 1 4 1 5 ... |
Test 29
Subtask: 2, 6
Verdict: ACCEPTED
| input |
|---|
| 99 4851 |
| correct output |
|---|
| 1 0 2 0 3 0 4 0 5 0 ... |
| user output |
|---|
| 1 1 1 2 1 3 1 4 1 5 ... |
Test 30
Subtask: 3, 4, 5, 6
Verdict: ACCEPTED
| input |
|---|
| 100 0 |
| correct output |
|---|
| 1 0 804289383 846930886 681692777 714636915 957747793 424238335 719885386 649760492 ... |
| user output |
|---|
| 1 1 2 -3 3 6 4 -10 5 15 ... |
Test 31
Subtask: 4, 5, 6
Verdict: ACCEPTED
| input |
|---|
| 100 1 |
| correct output |
|---|
| 1 0 2 0 804289383 846930886 681692777 714636915 957747793 424238335 ... |
| user output |
|---|
| 1 1 1 2 10 3 26 4 51 5 ... |
Test 32
Subtask: 4, 5, 6
Verdict: ACCEPTED
| input |
|---|
| 100 5 |
| correct output |
|---|
| 21392 0 22600 0 1 0 0 510510 804289383 846930886 ... |
| user output |
|---|
| 1 1 1 2 1 3 17 4 17 5 ... |
Test 33
Subtask: 4, 5, 6
Verdict: ACCEPTED
| input |
|---|
| 100 100 |
| correct output |
|---|
| 21392 0 22600 0 30056 0 34848 0 38584 0 ... |
| user output |
|---|
| 1 1 1 2 1 3 1 4 1 5 ... |
Test 34
Subtask: 5, 6
Verdict: ACCEPTED
| input |
|---|
| 100 1000 |
| correct output |
|---|
| 21392 0 22600 0 30056 0 34848 0 38584 0 ... |
| user output |
|---|
| 1 1 1 2 1 3 1 4 1 5 ... |
Test 35
Subtask: 5, 6
Verdict: ACCEPTED
| input |
|---|
| 100 1232 |
| correct output |
|---|
| 21392 0 22600 0 30056 0 34848 0 38584 0 ... |
| user output |
|---|
| 1 1 1 2 1 3 1 4 1 5 ... |
Test 36
Subtask: 5, 6
Verdict: ACCEPTED
| input |
|---|
| 100 1237 |
| correct output |
|---|
| 21392 0 22600 0 30056 0 34848 0 38584 0 ... |
| user output |
|---|
| 1 1 1 2 1 3 1 4 1 5 ... |
Test 37
Subtask: 6
Verdict: ACCEPTED
| input |
|---|
| 100 2222 |
| correct output |
|---|
| 21392 0 22600 0 30056 0 34848 0 38584 0 ... |
| user output |
|---|
| 1 1 1 2 1 3 1 4 1 5 ... |
Test 38
Subtask: 6
Verdict: WRONG ANSWER
| input |
|---|
| 100 3395 |
| correct output |
|---|
| 21392 0 22600 0 30056 0 34848 0 38584 0 ... |
| user output |
|---|
| 1 1 1 2 1 3 1 4 1 5 ... |
Test 39
Subtask: 2, 6
Verdict: ACCEPTED
| input |
|---|
| 100 4950 |
| correct output |
|---|
| 1 0 2 0 3 0 4 0 5 0 ... |
| user output |
|---|
| 1 1 1 2 1 3 1 4 1 5 ... |
Test 40
Subtask: 6
Verdict: WRONG ANSWER
| input |
|---|
| 100 4949 |
| correct output |
|---|
| 21392 0 22600 0 30056 0 34848 0 38584 0 ... |
| user output |
|---|
| 1 1 1 2 1 3 1 4 1 5 ... |
Test 41
Subtask: 6
Verdict: WRONG ANSWER
| input |
|---|
| 100 4948 |
| correct output |
|---|
| 21392 0 22600 0 30056 0 34848 0 38584 0 ... |
| user output |
|---|
| 1 1 1 2 1 3 1 4 1 5 ... |
Test 42
Subtask: 6
Verdict: WRONG ANSWER
| input |
|---|
| 100 4930 |
| correct output |
|---|
| 21392 0 22600 0 30056 0 34848 0 38584 0 ... |
| user output |
|---|
| 1 1 1 2 1 3 1 4 1 5 ... |
Test 43
Subtask: 6
Verdict: WRONG ANSWER
| input |
|---|
| 100 4920 |
| correct output |
|---|
| 21392 0 22600 0 30056 0 34848 0 38584 0 ... |
| user output |
|---|
| 1 1 1 2 1 3 1 4 1 5 ... |
Test 44
Subtask: 6
Verdict: WRONG ANSWER
| input |
|---|
| 100 4900 |
| correct output |
|---|
| 21392 0 22600 0 30056 0 34848 0 38584 0 ... |
| user output |
|---|
| 1 1 1 2 1 3 1 4 1 5 ... |
