提交记录 51467
| 提交时间 |
评测时间 |
| 2026-09-19 17:32:13 |
2026-09-19 17:33:33 |
#define DUMPIDX 1
#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;
}
//pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
| Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
| Testcase #1 | 99.07 us | 1 MB + 212 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #2 | 99.7 us | 1 MB + 212 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #3 | 98.8 us | 1 MB + 208 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #4 | 105.04 us | 1 MB + 216 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #5 | 105.3 us | 1 MB + 216 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #6 | 105.81 us | 1 MB + 208 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #7 | 110.53 us | 1 MB + 220 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #8 | 111.33 us | 1 MB + 212 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #9 | 116.2 us | 1 MB + 212 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #10 | 123.89 us | 1 MB + 212 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #11 | 99.96 us | 1 MB + 224 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #12 | 99.77 us | 1 MB + 220 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #13 | 99.02 us | 1 MB + 220 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #14 | 115.91 us | 1 MB + 260 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #15 | 115.03 us | 1 MB + 244 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #16 | 114.63 us | 1 MB + 228 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #17 | 12.968 ms | 1 MB + 476 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #18 | 13.794 ms | 1 MB + 404 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #19 | 13.91 ms | 1 MB + 528 KB | Accepted | Score: 5 | 显示更多 |
| Testcase #20 | 13.922 ms | 1 MB + 484 KB | Accepted | Score: 5 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2026-09-21 02:22:39 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠