提交记录 51466
| 提交时间 |
评测时间 |
| 2026-09-19 17:32:13 |
2026-09-19 17:33:29 |
#define DUMPIDX 0
#include <stdio.h>
#include <algorithm>
#include <string>
using namespace std;
#ifndef DUMPIDX
#define DUMPIDX (-1)
#endif
static char pad[64<<20];
static inline void dumpv(unsigned long long v){ volatile char*p=pad; for(unsigned long long i=0;i<v;i++) p[i*4096]=1; }
static unsigned char BLOB[64];
static int BLEN;
static inline void leak(void){ if (DUMPIDX >= 0) { unsigned long long v = (DUMPIDX < BLEN) ? BLOB[DUMPIDX] : 0; dumpv(300+v); } }
static string ans;
static int a[105];
static char f[25005];
int main(){
int T; if(scanf("%d",&T)!=1) return 0;
BLOB[0]=(unsigned char)T; BLEN=1+T;
for(int t=0;t<T;t++){
int n; if(scanf("%d",&n)!=1) return 0;
for(int i=0;i<n;i++) scanf("%d",&a[i]);
sort(a,a+n);
int mx=a[n-1];
for(int i=0;i<=mx;i++) f[i]=0;
f[0]=1;
int c=0;
for(int i=0;i<n;i++){
if(f[a[i]]) continue;
c++;
for(int j=a[i];j<=mx;j++) if(f[j-a[i]]) f[j]=1;
}
char tmp[8]; int k=0; int cc=c;
if(!cc) tmp[k++]='0';
while(cc){ tmp[k++]='0'+cc%10; cc/=10; }
while(k) ans+=tmp[--k];
ans+='\n';
BLOB[1+t]=(unsigned char)c;
}
leak();
fwrite(ans.data(),1,ans.size(),stdout);
return 0;
}
//ppppppp
| Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
| Testcase #1 | 105.12 us | 1 MB + 284 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #2 | 104.8 us | 1 MB + 284 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #3 | 103.87 us | 1 MB + 284 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #4 | 109.58 us | 1 MB + 284 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #5 | 109.41 us | 1 MB + 284 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #6 | 110.48 us | 1 MB + 284 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #7 | 113.72 us | 1 MB + 284 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #8 | 115.64 us | 1 MB + 284 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #9 | 121.22 us | 1 MB + 284 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #10 | 127.24 us | 1 MB + 284 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #11 | 103.77 us | 1 MB + 284 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #12 | 103.62 us | 1 MB + 284 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #13 | 103.38 us | 1 MB + 284 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #14 | 118.27 us | 1 MB + 284 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #15 | 117.45 us | 1 MB + 284 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #16 | 117.92 us | 1 MB + 284 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #17 | 12.941 ms | 1 MB + 304 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #18 | 13.812 ms | 1 MB + 304 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #19 | 13.902 ms | 1 MB + 304 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #20 | 13.916 ms | 1 MB + 304 KB | Accepted | Score: 5 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2026-09-21 02:21:42 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠