結果
問題 | No.8016 unordered_mapなるたけ落とすマン |
ユーザー | 👑 testestest |
提出日時 | 2016-05-22 00:35:38 |
言語 | C90 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 292 bytes |
コンパイル時間 | 575 ms |
コンパイル使用メモリ | 20,608 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-10-07 05:32:08 |
合計ジャッジ時間 | 5,858 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | AC | 0 ms
5,248 KB |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | TLE | - |
testcase_11 | WA | - |
testcase_12 | TLE | - |
testcase_13 | WA | - |
testcase_14 | TLE | - |
testcase_15 | TLE | - |
testcase_16 | TLE | - |
testcase_17 | TLE | - |
testcase_18 | TLE | - |
testcase_19 | TLE | - |
testcase_20 | TLE | - |
testcase_21 | TLE | - |
testcase_22 | TLE | - |
testcase_23 | TLE | - |
testcase_24 | TLE | - |
testcase_25 | TLE | - |
testcase_26 | TLE | - |
testcase_27 | TLE | - |
testcase_28 | TLE | - |
testcase_29 | TLE | - |
testcase_30 | TLE | - |
testcase_31 | TLE | - |
testcase_32 | TLE | - |
testcase_33 | TLE | - |
testcase_34 | TLE | - |
testcase_35 | TLE | - |
testcase_36 | TLE | - |
testcase_37 | TLE | - |
testcase_38 | TLE | - |
testcase_39 | TLE | - |
testcase_40 | TLE | - |
testcase_41 | WA | - |
testcase_42 | WA | - |
testcase_43 | WA | - |
testcase_44 | WA | - |
testcase_45 | WA | - |
testcase_46 | WA | - |
testcase_47 | WA | - |
testcase_48 | WA | - |
testcase_49 | WA | - |
testcase_50 | TLE | - |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | n,m,i,j,s; | ^ main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘n’ [-Wimplicit-int] main.c:1:3: warning: type defaults to ‘int’ in declaration of ‘m’ [-Wimplicit-int] 1 | n,m,i,j,s; | ^ main.c:1:5: warning: type defaults to ‘int’ in declaration of ‘i’ [-Wimplicit-int] 1 | n,m,i,j,s; | ^ main.c:1:7: warning: type defaults to ‘int’ in declaration of ‘j’ [-Wimplicit-int] 1 | n,m,i,j,s; | ^ main.c:1:9: warning: type defaults to ‘int’ in declaration of ‘s’ [-Wimplicit-int] 1 | n,m,i,j,s; | ^ main.c:3:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 3 | c(long*a,long*b){return*a-*b;} | ^ main.c: In function ‘main’: main.c:5:1: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 5 | scanf("%d%d",&n,&m); | ^~~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ +++ |+#include <stdio.h> 1 | n,m,i,j,s; main.c:5:1: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch] 5 | scanf("%d%d",&n,&m); | ^~~~~ main.c:5:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ main.c:6:25: warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘long int *’ [-Wformat=] 6 | for(i=0;i<n;i++)scanf("%d",a+i); | ~^ ~~~ | | | | | long int * | int * | %ld main.c:7:25: warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘long int *’ [-Wformat=] 7 | for(i=0;i<m;i++)scanf("%d",b+i); | ~^ ~~~ | | | |
ソースコード
n,m,i,j,s; long a[100010],b[100010]; c(long*a,long*b){return*a-*b;} int main(){ scanf("%d%d",&n,&m); for(i=0;i<n;i++)scanf("%d",a+i); for(i=0;i<m;i++)scanf("%d",b+i); qsort(a,n,4,c); for(i=0;i<m;i++){ j=s=0; while(j<n&&a[j]<b[i])j++; while(a[j]==b[i]){j++;s++;} printf("%d ",s); } return 0; }