結果

問題 No.1280 Beyond C
ユーザー tasukeshiptasukeship
提出日時 2021-03-04 17:49:31
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 600 bytes
コンパイル時間 376 ms
コンパイル使用メモリ 32,384 KB
実行使用メモリ 14,008 KB
最終ジャッジ日時 2024-04-15 10:10:46
合計ジャッジ時間 7,407 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
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 TLE -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

//1280
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<time.h>
int main(){
	int n;
	int m;
	int c;
	int i;
	int j,k;
	int pd;
	double pb;
	int count1=0,count2=0;
	int a[100000];
	int b[100000];
	printf("input n,m,c\n");
	scanf("%d %d %d",&n,&m,&c);
	printf("input a[i]\n");
	for(i=0;i<n;i++){
		scanf("%d",&a[i]);
	}
	printf("input b[i]\n");
	for(i=0;i<m;i++){
		scanf("%d",&b[i]);
	}
	for(j=0;j<n;j++){
		for(k=0;k<m;k++){
			pd=a[j]*b[k];
			if(pd>c){
				count1++;
			}
			else { 
				count2++;
			}
		}
	}
	pb=(double)count1/(count1+count2);
	printf("%lf",pb);
	system("pause");
}
0