提出 #71363428


ソースコード 拡げる

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

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);cout.tie(0);
    ll x,y,z;
    cin>>x>>y>>z;
    if(x==y){
        cout<<x<<' ';
        for(int j=0;j<x;j++){
            cout<<0<<' ';
        }
        cout<<endl;
        for(int i=0;i<2;i++){
            cout<<z<<' ';
            for(int j=0;j<z;j++){
                cout<<0<<' ';
            }
            cout<<endl;
        }
    }
    else{
        vector<int> a,b,c;
        for(int i=0;i<x;i++){
            a.push_back(0);
            b.push_back(0);
        }
        for(int i=0;i<z;i++){
            b.push_back(1);
            c.push_back(1);
        }
        for(int i=0;i<y;i++){
            if(i>=a.size()) a.push_back(0);
            c.push_back(0);
        }
        cout<<a.size()<<' ';
        for(int i=0;i<a.size();i++)
            cout<<a[i]<<' ';
        cout<<endl<<b.size()<<' ';
        for(int i=0;i<b.size();i++)
            cout<<b[i]<<' ';
        cout<<endl<<c.size()<<' ';
        for(int i=0;i<c.size();i++)
            cout<<c[i]<<' ';
    }
    return 0;
}
//455
//00000
//000011111
//1111100000

提出情報

提出日時
問題 B - Three Sequences
ユーザ Luongdung
言語 C++23 (GCC 15.2.0)
得点 500
コード長 1221 Byte
結果 AC
実行時間 1 ms
メモリ 3708 KiB

コンパイルエラー

./Main.cpp: In function 'int main()':
./Main.cpp:36:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   36 |             if(i>=a.size()) a.push_back(0);
      |                ~^~~~~~~~~~
./Main.cpp:40:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   40 |         for(int i=0;i<a.size();i++)
      |                     ~^~~~~~~~~
./Main.cpp:43:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   43 |         for(int i=0;i<b.size();i++)
      |                     ~^~~~~~~~~
./Main.cpp:46:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   46 |         for(int i=0;i<c.size();i++)
      |                     ~^~~~~~~~~

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 500 / 500
結果
AC × 1
AC × 27
セット名 テストケース
Sample 00-sample-001.txt
All 00-sample-001.txt, 01-one-001.txt, 01-one-002.txt, 01-one-003.txt, 01-one-004.txt, 01-one-005.txt, 01-one-006.txt, 01-one-007.txt, 01-one-008.txt, 01-one-009.txt, 01-one-010.txt, 01-one-011.txt, 01-one-012.txt, 01-one-013.txt, 01-one-014.txt, 01-one-015.txt, 02-two-001.txt, 02-two-002.txt, 02-two-003.txt, 02-two-004.txt, 02-two-005.txt, 02-two-006.txt, 02-two-007.txt, 02-two-008.txt, 02-two-009.txt, 02-two-010.txt, 02-two-011.txt
ケース名 結果 実行時間 メモリ
00-sample-001.txt AC 1 ms 3500 KiB
01-one-001.txt AC 1 ms 3692 KiB
01-one-002.txt AC 1 ms 3640 KiB
01-one-003.txt AC 1 ms 3676 KiB
01-one-004.txt AC 1 ms 3676 KiB
01-one-005.txt AC 1 ms 3676 KiB
01-one-006.txt AC 1 ms 3708 KiB
01-one-007.txt AC 1 ms 3596 KiB
01-one-008.txt AC 1 ms 3708 KiB
01-one-009.txt AC 1 ms 3520 KiB
01-one-010.txt AC 1 ms 3604 KiB
01-one-011.txt AC 1 ms 3516 KiB
01-one-012.txt AC 1 ms 3516 KiB
01-one-013.txt AC 1 ms 3668 KiB
01-one-014.txt AC 1 ms 3668 KiB
01-one-015.txt AC 1 ms 3520 KiB
02-two-001.txt AC 1 ms 3596 KiB
02-two-002.txt AC 1 ms 3516 KiB
02-two-003.txt AC 1 ms 3596 KiB
02-two-004.txt AC 1 ms 3668 KiB
02-two-005.txt AC 1 ms 3604 KiB
02-two-006.txt AC 1 ms 3680 KiB
02-two-007.txt AC 1 ms 3628 KiB
02-two-008.txt AC 1 ms 3640 KiB
02-two-009.txt AC 1 ms 3584 KiB
02-two-010.txt AC 1 ms 3692 KiB
02-two-011.txt AC 1 ms 3596 KiB