| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1367633 | hahaha | A String Problem (EGOI25_stringproblem) | C++20 | 75 ms | 3932 KiB |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
const int N=1e5+1;
struct coord{
int a;
int b;
};
vector<coord>pin;
int n;
signed main(){
cin>>n;
for(int i=0; i<n; i++){
int x,y;
cin>>x>>y;
if(y<x) swap(x,y);
pin.pb({x,y});
}
int sum=(2*n +1);
if(n%2==1){
cout<<n-1<<endl;
for(int i=1; i<n; i++){
cout<<i<<" "<<pin[i].b<<" "<<sum-pin[i].a<<endl;
}
}
else{
cout<<n-2<<endl;
for(int i=1; i<n; i++){
if((pin[i].a+pin[i].b)!=sum) cout<<i<<" "<<pin[i].b<<" "<<(2*n +1)-pin[i].a<<endl;
}
}
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
