結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
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 WA -
testcase_16 WA -
testcase_17 OLE -
testcase_18 OLE -
testcase_19 OLE -
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=0;l<=N;l++){
        printf("%d番目の値を入力:",l);
        scanf("%d",&A[l]);
    }
    
    for(i=0;i<=N;i++){
        for(j=0;j<=N;j++){
            printf("S[%d][%d]=%d\n",i,j,(A[i]*A[j])%2);
            if(S[i][j]>=K){
                count=count+1;
            }
        }
    }
    
    printf("%d\n",count);
    
    return 0;
    
}
0