QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#707493#9177. String and NailstamirCompile Error//C++14367b2024-11-03 16:13:342024-11-03 16:13:38

Judging History

你现在查看的是最新测评结果

  • [2024-11-03 16:13:38]
  • 评测
  • [2024-11-03 16:13:34]
  • 提交

answer

#include<bits/stdc++.h>
#define ll long long
#define ff first
#define ss second
using namespace std;
ll n,i;
pair<ll,ll> p[200005];
int main(){
	ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
	cin >> n;
	for(i=1;i<=n;i++) cin >> p[i].ff >> p[i].ss;
	sort(a+1,a+n+1);
	cout << "YES\n";
	for(i=1;i<n;i++) cout << p[i].ff << " " << p[i].ss << "\n";
}

詳細信息

answer.code: In function ‘int main()’:
answer.code:12:14: error: ‘a’ was not declared in this scope
   12 |         sort(a+1,a+n+1);
      |              ^