QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#410846 | #1156. Robots | kwongweng# | 0 | 100ms | 10248kb | C++17 | 746b | 2024-05-14 15:56:57 | 2024-05-14 15:56:58 |
Judging History
answer
#include "robots.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef long double ld;
typedef vector<vector<ll>> vll;
#define FOR(i, a, b) for(int i = a; i < b; i++)
#define ROF(i, a, b) for(int i = a; i >= b; i--)
#define pb push_back
#define ms memset
#define fi first
#define se second
int putaway(int A, int B, int T, int X[], int Y[], int W[], int S[]) {
sort(X,X+A); sort(W,W+T);
int ans = 0; int cnt = 0;
int cur = A-1;
if (W[T-1] >= X[cur]) return -1;
ROF(i,T-1,0){
while (cur>0 && W[i] < X[cur-1]) cur--;
ans = max(ans, (T-i+(A-cur+1)) / (A-cur));
}
return ans;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 14
Accepted
time: 0ms
memory: 6024kb
input:
1 1 2 13 13 5 6 13 13
output:
-1
result:
ok single line: '-1'
Test #2:
score: -14
Wrong Answer
time: 0ms
memory: 7940kb
input:
0 2 2 20 10 7 10 13 10
output:
-1
result:
wrong answer 1st lines differ - expected: '2', found: '-1'
Subtask #2:
score: 0
Wrong Answer
Test #8:
score: 14
Accepted
time: 94ms
memory: 9868kb
input:
50000 0 500000 1957680000 64280000 235160000 1384760000 1279320000 1005400000 1481760000 1129920000 1774640000 494160000 763120000 419640000 1742880000 1083000000 278360000 64040000 576880000 1479760000 1872320000 158480000 1183880000 81320000 249920000 30920000 1909240000 870920000 842280000 445640...
output:
17
result:
ok single line: '17'
Test #9:
score: 0
Accepted
time: 100ms
memory: 10248kb
input:
50000 0 500000 1259308694 1722606921 1479714896 1475931297 1942320254 1106961993 1138541861 1203363162 1463675587 1275336085 1847766630 1321488338 1222281203 1591977596 1409525422 1599394067 1145145532 1323526439 1598712171 1714056360 1476058962 1328447976 1935622082 1438076232 1341274687 1862703150...
output:
-1
result:
ok single line: '-1'
Test #10:
score: -14
Wrong Answer
time: 15ms
memory: 6344kb
input:
50000 0 50000 113928 75954 27813 115923 126882 62226 23610 50853 75387 41997 41316 45291 109398 32691 53328 120774 113403 75204 143499 136305 2766 4464 134799 7683 14460 87384 12351 103104 59130 17037 129444 97344 145227 146124 27390 123153 66891 70968 61710 51729 103593 9702 107829 22188 118152 962...
output:
3
result:
wrong answer 1st lines differ - expected: '2', found: '3'
Subtask #3:
score: 0
Skipped
Dependency #1:
0%
Subtask #4:
score: 0
Skipped
Dependency #3:
0%
Subtask #5:
score: 0
Skipped
Dependency #1:
0%