1 solutions
-
0
#include<bits/stdc++.h> using namespace std; int sum1[1005]={0},sum2[1005]={0}; int m1,w1,m2,w2,n,p,m; int main() { cin>>m>>n>>p; for(int i=1;i<=m;i++) { sum1[m1]=i; m1++; } for(int i=1;i<=n;i++) { sum2[m2]=i; m2++; } for(int i=1;i<=p;i++) { cout<<sum1[m1]<<" "<<sum2[m2]; sum1[m1]=sum1[w1]; m1++; w1++; sum2[m2]=sum2[w2]; m2++; w2++; } return 0; }
- 1
Information
- ID
- 1140
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 6
- Tags
- # Submissions
- 61
- Accepted
- 15
- Uploaded By