提出 #66930394


ソースコード 拡げる

#include <bits/stdc++.h>
#define ll long long
using namespace std;

const int Maxn=1e6+6;
int a[Maxn];
int n;

int main(){
    cin>>n;
    for(int i=1;i<n;i++)
    cin>>a[i];

    for(int i=1;i<n;i++) a[i]+=a[i-1];
    for(int i=1;i<n;i++,puts(""))
        for(int j=i;j<n;j++) cout<<a[j]-a[i-1]<<" ";


    system("pause");
    return 0;
}

提出情報

提出日時
問題 B - Distance Table
ユーザ AceTaffy_
言語 C++ 20 (gcc 12.2)
得点 200
コード長 360 Byte
結果 AC
実行時間 3 ms
メモリ 3684 KiB

コンパイルエラー

Main.cpp: In function ‘int main()’:
Main.cpp:19:11: warning: ignoring return value of ‘int system(const char*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   19 |     system("pause");
      |     ~~~~~~^~~~~~~~~

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 2
AC × 17
セット名 テストケース
Sample example_00.txt, example_01.txt
All example_00.txt, example_01.txt, hand_00.txt, hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt
ケース名 結果 実行時間 メモリ
example_00.txt AC 3 ms 3620 KiB
example_01.txt AC 2 ms 3556 KiB
hand_00.txt AC 2 ms 3684 KiB
hand_01.txt AC 2 ms 3496 KiB
hand_02.txt AC 2 ms 3516 KiB
hand_03.txt AC 1 ms 3672 KiB
hand_04.txt AC 1 ms 3620 KiB
random_00.txt AC 2 ms 3512 KiB
random_01.txt AC 2 ms 3616 KiB
random_02.txt AC 2 ms 3684 KiB
random_03.txt AC 2 ms 3524 KiB
random_04.txt AC 2 ms 3680 KiB
random_05.txt AC 2 ms 3572 KiB
random_06.txt AC 1 ms 3620 KiB
random_07.txt AC 2 ms 3512 KiB
random_08.txt AC 2 ms 3616 KiB
random_09.txt AC 1 ms 3520 KiB