| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1361484 | yyc000123 | A String Problem (EGOI25_stringproblem) | C++20 | 0 ms | 344 KiB |
#include<bits/stdc++.h>
using namespace std ;
#define F first
#define S second
const int N = 1e5+5 ;
int n , arr[2*N] , brr[4*N] , cnt ;
vector<pair<int,int>> vp ;
int main(){
ios::sync_with_stdio(0),cin.tie(0),cout.tie(0) ;
cin >> n ;
vp.resize(n) ;
for(int i=0 ; i<n ; i++){
cin >> vp[i].F >> vp[i].S ;
arr[vp[i].F]=vp[i].S ; arr[vp[i].S]=vp[i].F ;
if(abs(vp[i].F-vp[i].S)&1) brr[vp[i].F+vp[i].S]++ ;
}
int pos = max_element(brr,brr+4*n)-brr ;
cnt = n ;
for(int i=0 ; i<n ; i++){
if(vp[i].F+vp[i].S==pos) cnt-- ;
}
cout << cnt << '\n' ;
for(int i=0 ; i<cnt ; i++) cout << "1 2 3\n" ;
return 0 ;
}| # | 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... | ||||
