QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#446686#6389. TopicalsndCompile Error//C++141.5kb2024-06-17 15:07:502024-06-17 15:07:51

Judging History

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

  • [2024-06-17 15:07:51]
  • 评测
  • [2024-06-17 15:07:50]
  • 提交

answer

#include <bits/stdc++.h>
#define int long long
#define pp pop_back
#define pb push_back
#define eb emplace_back
#define nl cout "\n"
#define sp <<" "
#define spc <<" "<<
#define ff first
#define ss second
#define r0 return 0
#define INF INT_MAX
#define mod 998244353
#define MOD 1000000007
#define Yes cout << "YES" << endl
#define No cout << "NO" << endl
#define vi vector<int>
#define vll vector<ll>
#define vb vector<bool>
#define vd vector<double>
#define vs vector<string>
#define pii pair <int,int>
#define pll pair<ll,ll>
#define pls pair<ll,string>
#define psl pair<string,ll>
#define plc pair<ll,char>
#define pcl pair<char,ll>
#define pss pair<string,string>
#define pis pair<int,string>
#define sz size()
#define pause system("pause")
#define min3(a,b,c) min(a,min(b,c))
#define all(x) (x).begin(),(x).end()
#define deb(x) cout << #x << " - " << x << endl
using namespace std;
const int N=10000000000000009;
vector <int> v;
pair <int, int> p[N];
inline void test_case(){
	int n, k;
	cin >> n >> k;
	for(int i=0; i<n; i++){
		cin >> p[i].ff;
	}
	for(int i=0; i<n; i++){
		cin >> p[i].ss;
	}
	sort(p, p+n);
	int sc=0;
	int ans=0;
	for(int i=0; i<n; i++){
		if(sc>=p[i].ff){
			ans++;
			sc+=p[i].ss;
		}
	}
	cout << ans;
}
signed main () {
    ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
    int T = 1;
    // cin >> T;
    while(T--) {
        test_case();
    }
    
    return 0;
}






Details

/tmp/ccxUEDUf.o: in function `_GLOBAL__sub_I_v':
answer.code:(.text.startup+0x52): relocation truncated to fit: R_X86_64_PC32 against symbol `v' defined in .bss section in /tmp/ccxUEDUf.o
answer.code:(.text.startup+0x59): relocation truncated to fit: R_X86_64_PC32 against symbol `v' defined in .bss section in /tmp/ccxUEDUf.o
answer.code:(.text.startup+0x6b): relocation truncated to fit: R_X86_64_PC32 against symbol `v' defined in .bss section in /tmp/ccxUEDUf.o
collect2: error: ld returned 1 exit status