QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#864569 | #9679. 盒子 | KaXdd_# | 0 | 20ms | 3584kb | C++14 | 2.3kb | 2025-01-20 19:16:12 | 2025-01-20 19:16:12 |
Judging History
answer
#include<bits/stdc++.h>
#define int long long
#define rg register
#define il inline
#define TT(T, Args) template<typename T, typename... Args>
#define L(i, a, b) for (rg int i = (a); i <= (b); i++)
#define R(i, a, b) for (rg int i = (a); i >= (b); i--)
#define rep(i, a) for (rg auto i : a)
using namespace std;
namespace xmpl_{
il int rd(){
int f = 1, x = 0;
char ch = getchar();
while(ch < '0' || ch > '9'){
if (ch == '-') f = -1;
ch = getchar();
}
while(ch >= '0' && ch <= '9'){
x = x * 10 + ch - '0';
ch = getchar();
}
return x * f;
}
TT(T, Args) il void rd(T &x){
int f = 1;
x = 0;
char ch = getchar();
while(ch < '0' || ch > '9'){
if (ch == '-') f = -1;
ch = getchar();
}
while(ch >= '0' && ch <= '9'){
x = x * 10 + ch - '0';
ch = getchar();
}
x *= f;
}
TT(T, Args) il void rd(T &x, Args &...args){rd(x), rd(args...);}
TT(T, Args) il void rdArr(T *arr, int cnt){while(cnt--) rd(*arr), arr++;}
il void wt(int x){
if (x < 0){
putchar('-');
x = -x;
}
if (x > 9) wt(x / 10);
putchar(x % 10 + 48);
}
il void wtln(int x){wt(x), putchar('\n');}
il void wtsp(int x){wt(x), putchar(' ');}
il void swap(int &x, int &y){x ^= y ^= x ^= y;}
il int max(int x, int y){return (x > y ? x : y);}
il int min(int x, int y){return (x < y ? x : y);}
il void ckmax(int &x, int y){x = max(x, y);}
il void ckmin(int &x, int y){x = min(x, y);}
il void cksum(int &x, int y){x += y;}
TT(T, Args) il void ckmax(T &x, T y, Args &...args){ckmax(x, y), ckmax(x, args...);}
TT(T, Args) il void ckmin(T &x, T y, Args &...args){ckmin(x, y), ckmin(x, args...);}
TT(T, Args) il void cksum(T &x, T y, Args &...args){cksum(x, y), cksum(x, args...);}
}
using namespace xmpl_;
using namespace std;
const int N = 1e6 + 5, M = 21, K = 2e6 + 5, inf = 0x3f3f3f3f3f3f3f3f;
int n, m, k, c, s, a[N];
il void init(){
}
il void clear(){
}
il void work(){
rd(n, m, k, c), rdArr(a + 1, n);
s = 0;
L(i, 1, n) s += a[i];
wt((s - 1) / k + 1);
}
signed main(){
// #define file 114514
#ifdef file
freopen("code.in", "r", stdin);
freopen("code.out", "w", stdout);
#endif
// init();
int t = 1;
t = rd();
while(t--){
clear();
work();
puts("");
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 3584kb
input:
3 5 2 4 3 2 2 1 2 2 4 2 4 3 2 4 1 1 10 3 5 1 2 2 2 2 1 1 1 10 2 2
output:
3 2 5
result:
wrong answer 1st numbers differ - expected: '7', found: '3'
Subtask #2:
score: 0
Skipped
Dependency #1:
0%
Subtask #3:
score: 0
Skipped
Dependency #2:
0%
Subtask #4:
score: 0
Wrong Answer
Test #35:
score: 0
Wrong Answer
time: 20ms
memory: 3584kb
input:
66664 7 2 82188055 1 35930054 4923258 36288509 46890418 53350617 49812938 68015568 10 2 460335201 1 305598063 240803174 36008172 416771728 391050572 270293987 333994588 436573185 216917970 103343453 9 3 119910901 1 35106715 29444257 72409421 49339248 23617992 3266647 38704192 75874356 72979434 10 1 ...
output:
4 6 4 10 6 2 6 8 3 3 4 5 5 5 8 8 6 10 4 6 4 8 7 4 3 6 6 4 4 4 5 3 4 8 4 7 2 5 6 7 5 5 10 9 4 5 9 10 6 5 6 5 7 5 3 8 5 5 6 5 5 4 9 6 5 4 5 5 4 6 6 7 5 4 3 4 5 4 5 9 6 9 8 5 3 8 10 4 2 4 4 3 6 6 5 9 4 3 5 7 4 4 4 10 8 10 8 3 3 5 6 4 8 9 5 12 10 7 7 8 5 9 10 6 6 6 6 6 6 4 4 5 10 7 11 3 3 3 8 9 5 9 7 8 ...
result:
wrong answer 1st numbers differ - expected: '5', found: '4'
Subtask #5:
score: 0
Skipped
Dependency #1:
0%