提交记录 27476


用户 题目 状态 得分 用时 内存 语言 代码长度
Pursuing_OIer 1000i. 【传统题】 A+B Problem Accepted 100 64.36 us 40 KB C++ 1.94 KB
提交时间 评测时间
2024-12-15 12:36:14 2024-12-15 12:36:16
#include<bits/stdc++.h>
#define ll long long
#define endl '\n'
#define sort stable_sort
using namespace std;
const int N=1e5+10;
template<typename Tp> inline void read(Tp&x)
{
	x=0;register bool z=true;
	register char a=getchar_unlocked();
	for(;!isdigit(a);a=getchar_unlocked()) if(a=='-') z=0;
	for(;isdigit(a);a=getchar_unlocked()) x=(x<<1)+(x<<3)+(a^48);
	x=(z?x:~x+1);
}
template<typename T,typename ...Tp> inline void read(T &x,Tp &...y){read(x);read(y...);}
template<typename Tp> inline void wt(Tp x){if(x>9)wt(x/10);putchar_unlocked((x%10)+'0');}
template<typename Tp> inline void write(Tp x){if(x<0)putchar_unlocked('-'),x=~x+1;wt(x);}
template<typename T,typename ...Tp> inline void write(T x,Tp ...y){write(x);putchar_unlocked(' ');write(y...);}
int n,m,mx,tot,sum,a[N],p[N],ans[N]; bool vis[N];
struct aa {int id,x,y;}b[N<<5]; vector<pair<int,int> >q;
signed main()
{
	// read(n,m); for(int i=p[0]=1;i<=30;i++) p[i]=p[i-1]<<1;
	// for(int i=1;i<=n;i++)
	// {
	// 	read(a[i]); if(a[i]>a[mx]) mx=i;
	// 	for(int j=0;j<=30;j++) b[++tot]={i,a[i],p[j]};
	// }
	// sort(b+1,b+1+tot,[&](aa a,aa b){return 1ll*a.x*b.y>1ll*b.x*a.y;});
	// q.push_back(make_pair(b[1].id,b[1].x)); b[tot+1].x=0;
	// for(int i=2;i<=tot+1;i++)
	// {
	// 	if(1ll*b[i].x*b[i-1].y!=1ll*b[i-1].x*b[i].y)
	// 	{
	// 		int pos1=0,pos2=0,cnt=q.size();
	// 		sort(q.begin(),q.end()); for(auto j:q)
	// 		{
	// 			if(!vis[j.first])
	// 			{
	// 				ans[j.first]++,vis[j.first]=1,cnt--;
	// 				if((++sum)>=m) break;
	// 			}
	// 			else if(!pos2) pos1=j.second,pos2=j.first;
	// 			else if(j.second>pos1) pos1=j.second,pos2=j.first;
	// 			else if(j.second==pos1) pos2=min(pos2,j.first);
	// 		}
	// 		if(pos2) ans[pos2]+=min(cnt,m-sum);
	// 		q.clear(); if((sum+=cnt)>=m) break;
	// 	}
	// 	q.push_back(make_pair(b[i].id,b[i].x));
	// }
	// ans[mx]+=max(0,m-tot);
	// for(int i=1;i<=n;i++) write(ans[i]),putchar_unlocked(' ');
	read(n);
	for(int i=1;i<=n;i++)
	{
		ll x,y;
		read(x,y);
		write(x+y),puts("");
	}
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #164.36 us40 KBAcceptedScore: 100


Judge Duck Online | 评测鸭在线
Server Time: 2025-08-03 11:04:24 | Loaded in 0 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠