結果

問題 No.1882 Areas of Triangle
ユーザー RO1630
提出日時 2022-03-24 21:28:16
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 563 bytes
コンパイル時間 182 ms
コンパイル使用メモリ 31,616 KB
実行使用メモリ 13,636 KB
最終ジャッジ日時 2024-10-13 05:13:22
合計ジャッジ時間 7,131 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1 -- * 4
other WA * 13 RE * 3 OLE * 3 -- * 5
権限があれば一括ダウンロードができます

ソースコード

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