結果

問題 No.1882 Areas of Triangle
ユーザー RO1630
提出日時 2022-03-24 21:13:55
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 536 bytes
コンパイル時間 347 ms
コンパイル使用メモリ 32,256 KB
実行使用メモリ 814,328 KB
最終ジャッジ日時 2024-10-13 04:57:55
合計ジャッジ時間 4,856 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1 -- * 4
other WA * 19 RE * 3 MLE * 1 -- * 1
権限があれば一括ダウンロードができます

ソースコード

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++){
            S[i][j]=(A[i]*A[j])%2;
            if(S[i][j]>=K){
                count++;
            }
        }
    }
    
    printf("%d\n",count);
    
    return 0;
    
}
0