Блог пользователя FabiOquendo

Автор FabiOquendo, история, 11 лет назад, По-английски

When you submit a code, codeforces shows the testcases of the problem, but when the input is too long it can't be copy because the input is INCOMPLETE. Someone knows HOW TO SEE OR COPY A COMPLETE INPUT?

  • Проголосовать: нравится
  • +5
  • Проголосовать: не нравится

»
11 лет назад, скрыть # |
 
Проголосовать: нравится +20 Проголосовать: не нравится

you can't .

»
11 лет назад, скрыть # |
 
Проголосовать: нравится +45 Проголосовать: не нравится

I guess you are interested in your last submission 12190150, which fails 19th test case. Here's how you can abuse the system:

  1. Find some distinctive feature of the failing test. This particular one is easy: it is the first test case starting with 'd'. Here's my submission to be sure: 12197471
  2. Once you encountered the failing test case, output raw input instead of the answer: 12197631
  3. Codeforces will output only first 511 characters. It means you are to repeat step 2, writing to the output another portion of the input: 12197650, 12197674, 12197689

And here's extracted test case itself: http://pastebin.com/JxkE7pDV

»
11 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

You can't and it's the reason why codeforces doesn't allow to do it is intentional

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

This should really be implemented as a new feature.

»
6 лет назад, скрыть # |
 
Проголосовать: нравится -56 Проголосовать: не нравится

include<bits/stdc++.h>

using namespace std; int main() { long int num,base,i=0;

int t;
cin>>t;
while(t--)
{
    int n,k,flg=0;
    cin>>n>>k;
    long long int a[n];
    for(int i=0;i<n;i++)
       cin>>a[i];

vector<long long int>v;
set<long int>st;
  for(int j=0;j<n;j++)
 {     num=a[j];base=k,i=0;
      while(num>0)
   {
      if(num%base==1)
      { v.push_back(i);
       }
      if(num%base>1)
       {cout<<"NO"<<endl;
         flg=1;
        break;}
       num=num/base;
        i++;
    }

  }
  if(flg==0)
  {
     for(int i=0;i<v.size();i++)
       st.insert(v[i]);

       if(v.size()==st.size())
        cout<<"YES"<<endl;
       else
       cout<<"NO"<<endl;
   }


  st.clear();
  v.clear();
}
return 0;

}