結果
問題 | No.8016 unordered_mapなるたけ落とすマン |
ユーザー | 👑 testestest |
提出日時 | 2016-05-22 00:35:49 |
言語 | C90 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 292 bytes |
コンパイル時間 | 781 ms |
コンパイル使用メモリ | 20,480 KB |
実行使用メモリ | 13,632 KB |
最終ジャッジ日時 | 2024-10-07 05:34:23 |
合計ジャッジ時間 | 6,209 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
13,632 KB |
testcase_01 | AC | 1 ms
6,816 KB |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | TLE | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
testcase_32 | -- | - |
testcase_33 | -- | - |
testcase_34 | -- | - |
testcase_35 | -- | - |
testcase_36 | -- | - |
testcase_37 | -- | - |
testcase_38 | -- | - |
testcase_39 | -- | - |
testcase_40 | -- | - |
testcase_41 | -- | - |
testcase_42 | -- | - |
testcase_43 | -- | - |
testcase_44 | -- | - |
testcase_45 | -- | - |
testcase_46 | -- | - |
testcase_47 | -- | - |
testcase_48 | -- | - |
testcase_49 | -- | - |
testcase_50 | -- | - |
コンパイルメッセージ
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,8,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; }