Submission #3388505


Source Code Expand

using System;
using System.Linq;//リストの使用
using System.Collections.Generic;
class Program
{
	static void Main()
	{
		string[] input = Console.ReadLine().Split(' ');//Splitで区切り文字を指定して複数個受け取る。
		long n = long.Parse(input[0]);
		long k = long.Parse(input[1]);
    long[,] vertexes = new long[n,2];
    for(long i = 0; i < n; i++)
    {
      var nums = Console.ReadLine().Split(' ');//1行ごとに受け取る
      vertexes[i,0] = long.Parse(nums[0]);
      vertexes[i,1] = long.Parse(nums[1]);
      vertexes[i,0] %= 2 * k;
      vertexes[i,1] %= 2 * k;
      if(nums[2] == "W")
      {
        if(vertexes[i,0] < k) vertexes[i,0] += k;//WをBに反転
        else vertexes[i,0] -= k;
        if(vertexes[i,1] < k) vertexes[i,1] += k;
        else vertexes[i,1] -= k;
      }
    }

    

    
    
		Console.WriteLine(answer);
	}
}

Submission Info

Submission Time
Task D - Checker
User suikameron
Language C# (Mono 4.6.2.0)
Score 0
Code Size 917 Byte
Status CE

Compile Error

./Main.cs(32,21): error CS0103: The name `answer' does not exist in the current context