#include<bits/stdc++.h>
using namespace std;
#define int long long
#define endl '\n'
#define inf 0x3f3f3f3f
const int N=2e5+5;
int n;
map<pair<int,int>,int>mp;
void solve(){
cin>>n;
while(n--){
int x,y;
cin>>x>>y;
if(y>=1) mp[{x,y-1}]=1;
else mp[{x-1,y+60-1}];
if(y>=3) mp[{x,y-3}]=1;
else mp[{x-1,y+60-3}];
if(y>=5) mp[{x,y-5}]=1;
else mp[{x-1,y+60-5}];
}
cout<<mp.size()<<endl;
for(auto it:mp){
cout<<it.first.first<<" "<<it.first.second<<endl;
}
}
signed main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int t=1;
// cin>>t;
while(t--) solve();
return 0;
}
时间管理大师(模拟)---牛客小白月赛88-C
最新推荐文章于 2024-08-16 21:41:25 发布