Submission #354857


Source Code Expand

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DepthFirstSearch
{
    class Program
    {
        //static int a, b, c, d, e, n, h;
        static int[] arr;
        static void Main(string[] args)
        {
            Console.SetIn(new StreamReader(Console.OpenStandardInput(20000)));
            //string[] s = Console.ReadLine().Split(' ');
            int n = int.Parse(Console.ReadLine());

            Console.WriteLine((n%12)+1);
            Console.ReadLine();
        }

        static void swap(int pos)
        {
            int tmp = arr[pos];
            arr[pos] = arr[pos - 1];
            arr[pos - 1] = tmp;
        }


        static void areFriends(Person a, Person b)
        {
            a.firends.Add(b.ID);
            b.firends.Add(a.ID);
        }
    }

    public class Tree
    {
        public Node _root;

        public Tree(Node root)
        {
            this._root = root;
        }

        public void addChild(Node root, Node child)
        {
            child.Parent = root;
            root.childs.Add(child);
        }

    }

    public class Point
    {
        public double x { get; set; }
        public double y { get; set; }

        public Point(double x, double y)
        {
            this.x = x;
            this.y = y;
        }

        public void assign(Point p)
        {
            this.x = p.x;
            this.y = p.y;
        }
    }

    public class Line
    {
        public Point a { get; set; }
        public Point b { get; set; }

        public Line(Point a, Point b)
        {
            this.a.assign(a);
            this.b.assign(b);
        }

        public bool isVer()
        {
            if (Math.Abs(a.x - b.x) < 0.01) return true;
            return false;
        }

        public bool isHor()
        {
            if (Math.Abs(a.y - b.y) < 0.01) return true;
            return false;
        }

        public double slope()
        {
            double s = (a.y - b.y) / (a.x - b.x);
            return s;
        }

        public bool isOnLine(Point p)
        {
            //parallel
            if (a.y - b.y == 0)
            {
                if (p.y - a.y == 0)
                    return true;
                else
                    return false;
            }

            //not parallel
            double slope = (a.x - b.x) / (a.y - b.x);

            if (Math.Abs((p.x - b.x) / (p.y - b.x) - slope) <= 0.01)
                return true;
            else
                return false;
        }

        public bool isIntersect(Line l)
        {
            if ((l.isHor() && this.isHor()) || l.isVer() && this.isVer())
                return false;
            return true;
        }
    }

    public class Node
    {
        public HashSet<Node> childs = new HashSet<Node>();
        public Node Parent;
        public int cost;
        public int fuel;
        public int grad;

        public Node(int cost, int fuel, int grad)
        {
            this.cost = cost;
            this.fuel = fuel;
            this.grad = grad;
        }
    }

    public class Person
    {
        public HashSet<int> firends = new HashSet<int>();
        public int ID { get; set; }

        public Person(int id)
        {
            this.ID = id;
        }
    }
}

Submission Info

Submission Time
Task A - 来月は何月?
User chouaib
Language C# (Mono 2.10.8.1)
Score 100
Code Size 3521 Byte
Status AC
Exec Time 119 ms
Memory 7856 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 12
Set Name Test Cases
All test_1.txt, test_10.txt, test_11.txt, test_12.txt, test_2.txt, test_3.txt, test_4.txt, test_5.txt, test_6.txt, test_7.txt, test_8.txt, test_9.txt
Case Name Status Exec Time Memory
test_1.txt AC 108 ms 7820 KB
test_10.txt AC 107 ms 7784 KB
test_11.txt AC 107 ms 7820 KB
test_12.txt AC 105 ms 7856 KB
test_2.txt AC 107 ms 7852 KB
test_3.txt AC 107 ms 7848 KB
test_4.txt AC 107 ms 7776 KB
test_5.txt AC 119 ms 7776 KB
test_6.txt AC 104 ms 7776 KB
test_7.txt AC 104 ms 7824 KB
test_8.txt AC 105 ms 7788 KB
test_9.txt AC 109 ms 7828 KB