結果
| 問題 | 
                            No.478 一般門松列列
                             | 
                    
| コンテスト | |
| ユーザー | 
                             threecourse
                         | 
                    
| 提出日時 | 2018-05-16 11:24:59 | 
| 言語 | C#(csc)  (csc 3.9.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 1,654 bytes | 
| コンパイル時間 | 882 ms | 
| コンパイル使用メモリ | 107,776 KB | 
| 実行使用メモリ | 19,808 KB | 
| 最終ジャッジ日時 | 2024-06-28 13:17:07 | 
| 合計ジャッジ時間 | 7,505 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 4 WA * 30 | 
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Competitive
{
    internal class Solution
    {
        public int N, K;
        public void Run()
        {
            {
                var line = Input.ReadIntArray();
                N = line[0];
                K = line[1];
            }
            List<int> ret = new List<int>();
            for (int i = 0; i < N - K; i++)
            {
                ret.Add(i % 2);
            }
            int last = ret.Last();
            for (int i = N - K; i < N; i++)
            {
                ret.Add(last);
            }
            Console.WriteLine(string.Join(" ", ret));
        }
    }
    // libs ----------
    
    // common ----------
    internal static class Input
    {
        public static int ReadInt()
        {
            string line = Console.ReadLine();
            return int.Parse(line);
        }
        public static int[] ReadIntArray()
        {
            string line = Console.ReadLine();
            return line.Split(' ').Select(int.Parse).ToArray();            
        }
        public static double[] ReadDoubleArray()
        {
            string line = Console.ReadLine();
            return line.Split(' ').Select(double.Parse).ToArray();
        }
        public static long[] ReadLongArray()
        {
            string line = Console.ReadLine();
            return line.Split(' ').Select(long.Parse).ToArray();
        }
    }
    
    internal class Program
    {
        public static void Main(string[] args)
        {
            var s = new Solution();
            s.Run();
        }
    }
}
            
            
            
        
            
threecourse