|
|
вернуться в форумI THINK THAT MY PROGRAM MUST HAVE AC BUT WA3 WHAT THE 3 TEST???? PLEASE POST TEST №3!!!!!!! Edited by author 13.05.2007 15:12 blonde :) ha ha. It is joke about WRITING MESSAGES WITH CAPS LOCK ON Which difference write messages WITH CAPS LOCK ON or with caps lock off? Please post some tests! I dont know why my program had WA :( 12 335 1 2 3 4 5 6 7 8 9 0 7 7 answer 7123456789 Thanks for the test, I've got AC! #include <iostream> #include <algorithm> using namespace std; int main() { int i,n,m; cin>>n>>m; long int *a=new long int [n]; for(i=0;i<n;i++) cin>>a[i]; rotate(a,a+m,a+n); long int b[10]; for(i=0;i<10;i++) b[i]=a[i]; for(i=0;i<10;i++) cout<<b[i]; cout<<endl; return 0; } the test of Alias doesn't work,but why?What is incorrect in code? Already got AC....this code is right,you only need to decrease the quantity of ranges by decreasing the "m".......make m<n and everything will be ok ;) Or you can use "%" :) And yes,i'm necroposter ))) |
|
|