题目1004:Median //#include<iostream> //long long a1[1000010],a2[1000010]; //using namespace std; //int main(){ // long long n1,n2; // long long num; // // long long t; // wh
//题目1001:A+B for Matrices #include<iostream> #include<string.h> using namespace std; int main() { int M,N; int a1[11][11],a2[11][11]; int a_s[11],b_s[11]; int num=0; while(cin
//题目1003:A+B #include<iostream> #include<string.h> using namespace std; int main() { int n1,n2; int s1[12],s2[12]; int s[12]; char c1[20],c2[20]; while(cin>>c1){ n1=0,n2=0;
//1031:xxx定律 #include<iostream> using namespace std; int main(){ int n; while(cin>>n&&n!=0){ int num=0; while(n!=1){ if(n%2==0){ n/=2; num++; } else{ n=3*n+1; n/
//题目1028:继续畅通工程 #include<iostream> #include<algorithm> using namespace std; int Tree[1010]; int findRoot(int x){ if(Tree[x]==-1) return x; else { int tmp=findRoot(Tree[x]); Tree[
Rotate Image Total Accepted: 4289 Total Submissions: 14183 My Submissions You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Follow up: Coul