|
|
back to boardGive me some tests please WA 16 Posted by Aneto 5 Apr 2008 21:11 There was an error with data input using StreamTokenizer, so be careful if you are using it. Edited by author 05.04.2008 21:15 Edited by author 06.04.2008 04:02 Re: Give me some tests please WA 16 Thank you! Scanner() got AC. Re: Give me some tests please WA 16 Posted by Akmal 22 Jun 2013 20:09 int main() { int n; cin>>n; int i; for(i=0;i<n/2;i++) cout<<i+1<<" "<<n-i<<" "; if(n%2!=0) cout<<((int)n/2)+1<<" "; cout<<endl; cout<<"1 "; for(i=3;i<n;i+=2) cout<<i<<" "; int p=n; if(p%2!=0) { p-=1; cout<<n<<" "; } for(p=p;p>1;p-=2) cout<<p<<" "; return 0; } Re: Give me some tests please WA 16 input1: 1651 1654654564 output1: 1043406233 intput2: 77251 78156464666454 output2: 37919407177871 intput3: 1 999999999999 output3: 537412247190 input4: 101231 1000000000000000000 output4: 391773528202165271 input5: 123456789 987654321 output5: 567000597 input6: 202250020115 3000200002203254 output6: 1339741370499750 |
|
|