I'm getting runtime error with exit code -1073741571.Help please problem link : https://codeforces.me/problemset/problem/254/A Here is my submission screenshot url : https://www.imageupload.net/image/capture2.dbfwh
I'm getting runtime error with exit code -1073741571.Help please problem link : https://codeforces.me/problemset/problem/254/A Here is my submission screenshot url : https://www.imageupload.net/image/capture2.dbfwh
| # | User | Rating |
|---|---|---|
| 1 | Benq | 3676 |
| 2 | Kevin114514 | 3659 |
| 3 | jiangly | 3640 |
| 4 | turmax | 3450 |
| 5 | tourist | 3382 |
| 6 | strapple | 3360 |
| 7 | Um_nik | 3354 |
| 8 | squareOf105 | 3348 |
| 9 | maroonrk | 3312 |
| 10 | idontwannadothis…e | 3191 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 155 |
| 2 | nik_exists | 151 |
| 3 | maspy | 149 |
| 4 | AmShZ | 145 |
| 5 | Um_nik | 143 |
| 6 | Errichto | 139 |
| 7 | BledDest | 136 |
| 8 | adamant | 134 |
| 9 | maroonrk | 132 |
| 10 | cry | 130 |
| Name |
|---|



Here is my code :
include<stdio.h>
int main() { int n,i,j,c=0; scanf("%d",&n); n*=2; int a[n]; for(i=0;i<n;i++) scanf("%d",&a[i]); for(i=0;i<n-1;i++) { for(j=i+1;j<n;j++) { if(a[i]==a[j]) { printf("%d %d\n",i+1,j+1); c++; break; } } } if(c==0) printf("-1");
}
At least give code in proper manner so that someone can understand it.You can paste code in ide like geeksforgeeks and generate link.
sorry for that inconvenience,i am new in codeforces.So i don't know how to do that,i have tried.
Try adding this to your code inside main function