結果

問題 No.1882 Areas of Triangle
ユーザー RO1630RO1630
提出日時 2022-03-24 21:52:28
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 563 bytes
コンパイル時間 371 ms
コンパイル使用メモリ 32,128 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-04-21 06:52:03
合計ジャッジ時間 4,826 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 OLE -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
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 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

int main()
{
    int N,K,l,i,j,count;
    printf("Nの値を入力:");
    scanf("%d",&N);
    printf("Kの値を入力:");
    scanf("%d",&K);

    count=0;
    
    int A[N],S[N][N];
    for(l=1;l<=N;l++){
        printf("%d番目の値を入力:",l);
        scanf("%d",&A[l]);
    }
    
    for(i=1;i<=N;i++){
        for(j=1;j<=N;j++){
            printf("S[%d][%d]=%d\n",i,j,(A[i]*A[j])/2);
            if((A[i]*A[j])/2>=K){
                count++;
            }
        }
    }
    
    printf("%d\n",count);
    
    return 0;
    
}
0