Submission #185569


Source Code Expand

using System;
using System.Collections;
using System.Collections.Generic;
 
class Myon
{
    public Myon() { }
    public static int Main()
    {
        new Myon().calc();
        return 0;
    }
 
 
    void calc()
    {
        string[] st;
        int n = 7;
        st = splitLine(n, n);
        int[] a = new int[n];
        for (int i = 0; i < n; i++)
        {
            a[i] = getInt(st[i], 0, 2000);
        }
        st = splitLine(n, n);
        int[] b = new int[n];
        for (int i = 0; i < n; i++)
        {
            b[i] = getInt(st[i], 0, 2000);
        }
 
        int ret = 0;
        for (int i = 0; i < n; i++)
        {
            ret += Math.Max(a[i], b[i]);
        }
        Console.WriteLine(ret);
    }
 
    //swap
    void swap<T>(ref T a, ref T b)
    {
        T c = a;
        a = b;
        b = c;
    }
 
    void myon(string s)
    {
        throw new Exception(s);
    }
 
    int getInt(string s, int min, int max)
    {
        int ret = int.Parse(s);
        if (ret < min) throw new Exception("low");
        if (ret > max) throw new Exception("high");
        return ret;
    }
 
    int getIntLine(int min, int max)
    {
        int ret = int.Parse(Console.ReadLine());
        if (ret < min) throw new Exception("low");
        if (ret > max) throw new Exception("high");
        return ret;
    }
 
    double getDouble(string s, double min, double max)
    {
        double ret = double.Parse(s);
        if (ret < min) throw new Exception("low");
        if (ret > max) throw new Exception("high");
        return ret;
    }
 
    double getDoubleLine(double min, double max)
    {
        double ret = double.Parse(Console.ReadLine());
        if (ret < min) throw new Exception("low");
        if (ret > max) throw new Exception("high");
        return ret;
    }
 
    string getString(string s, int min, int max)
    {
        if (s.Length < min) throw new Exception("low");
        if (s.Length > max) throw new Exception("high");
        return s;
    }
 
    string getStringLine(int min, int max)
    {
        string s = Console.ReadLine();
        if (s.Length < min) throw new Exception("low");
        if (s.Length > max) throw new Exception("high");
        return s;
    }
 
    string[] splitLine(int min, int max)
    {
        string[] ret = Console.ReadLine().Split(' ');
        if (ret.Length == 1 && ret[0] == "") ret = new string[0];
        if (ret.Length < min || ret.Length > max) throw new Exception("wrong length");
        return ret;
    }
}

Submission Info

Submission Time
Task A - ゴールドラッシュ
User chokudai
Language C# (Mono 2.10.8.1)
Score 100
Code Size 2634 Byte
Status AC
Exec Time 142 ms
Memory 7840 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 4
AC × 19
Set Name Test Cases
Sample subtask0_sample-01.txt, subtask0_sample-02.txt, subtask0_sample-03.txt, subtask0_sample-04.txt
All subtask0_sample-01.txt, subtask0_sample-02.txt, subtask0_sample-03.txt, subtask0_sample-04.txt, subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt, subtask1_07.txt, subtask1_08.txt, subtask1_09.txt, subtask1_10.txt, subtask1_11.txt, subtask1_12.txt, subtask1_13.txt, subtask1_14.txt, subtask1_15.txt
Case Name Status Exec Time Memory
subtask0_sample-01.txt AC 130 ms 7700 KB
subtask0_sample-02.txt AC 132 ms 7708 KB
subtask0_sample-03.txt AC 133 ms 7708 KB
subtask0_sample-04.txt AC 130 ms 7720 KB
subtask1_01.txt AC 130 ms 7712 KB
subtask1_02.txt AC 132 ms 7708 KB
subtask1_03.txt AC 132 ms 7708 KB
subtask1_04.txt AC 129 ms 7708 KB
subtask1_05.txt AC 131 ms 7712 KB
subtask1_06.txt AC 132 ms 7760 KB
subtask1_07.txt AC 130 ms 7840 KB
subtask1_08.txt AC 130 ms 7708 KB
subtask1_09.txt AC 131 ms 7708 KB
subtask1_10.txt AC 133 ms 7708 KB
subtask1_11.txt AC 132 ms 7708 KB
subtask1_12.txt AC 132 ms 7708 KB
subtask1_13.txt AC 131 ms 7696 KB
subtask1_14.txt AC 130 ms 7708 KB
subtask1_15.txt AC 142 ms 7704 KB