Submission #1175710


Source Code Expand

using System;
2.using System.Collections.Generic;
3.using System.Linq;
4.using System.Text;
5.using System.Diagnostics;
6. 
7.using System.IO;
8. 
9.class _Class
10.{
11.	
12.	void _Do()
13.  {
14. 
15.    for (int i=0;i<1000;i++)
16.    {
17.      var DT = _int();
18.      var D_客欲しい = DT[0];
19.      var 時間 = DT[1];
20.      var C_固定値 = _int();
21.      var A_可変 = _int();
22. 
23.      //
24.      var b = true;
25. 
26.#if true
27.      // 売る
28.      // ???
29.      { 
30.        for (int n = 0;n<8;n++)
31.        {
32.          //
33.          if (A_可変[n] == D_客欲しい)
34.          {
35.            // 
36.            Console.WriteLine("sell 1 " + (n + 1));
37.            b = false;
38.            break;
39.          }
40.        }
41.      }
42.#endif
43.#if true
44. 
45.      // 
46.      if (b)
47.      {
48.        for (int n = 0; n <8; n++)
49.        {
50.          //
51.          if (A_可変[n] == 0)
52.          {
53.            // 0
54.            Console.WriteLine("fill " + (n + 1));
55.            b = false;
56.            break;
57.          }
58.        }
59.      }
60.#endif
61.#if false
62.      if (b){
63.        Console.WriteLine("move " + a + " " + b);
64.        b = false;
65.      }
66. 
67.      if (b) {
68.        Console.WriteLine("change " + n);
69.        b = false;
70.      }
71.#endif
72.      //ok
73.      if (b)
74.      {
75.        Console.WriteLine("pass");
76.        b = false;
77.      }
78.    }
79. 
80.	}
81. 
82. 
83. 
84.	static void Main(string[] args)
85.  {
86.    new _Class()._Do();
87.  }
88. 
89.#region
90. 
91.  string _string()
92.  {
93.    return Console.ReadLine();
94.  }
95. 
96.	//
97.	string[] _strings()
98.  {
99.    return Console.ReadLine().Split();
100.  }
101. 
102.  int[] _int(int n)
103.  {
104.    var x = new int[n];
105.    for (var i = 0; i < n; i++)
106.    {
107.      x[i] = int.Parse(Console.ReadLine());
108.    }
109.    return x;
110.  }
111. 
112.	//
113.	int[] _int()
114.  {
115.    var ss = Console.ReadLine().Split();
116. 
117.    var x = new int[ss.Length];
118.    for (var i = 0; i < ss.Length; i++)
119.      x[i] = int.Parse(ss[i]);
120. 
121.    return x;
122.  }
123. 
124.	long[] _long()
125.	{
126.		var ss = Console.ReadLine().Split();
127. 
128.		var x = new long[ss.Length];
129.		for (var i = 0; i < ss.Length; i++)
130.			x[i] = long.Parse(ss[i]);
131. 
132.		return x;
133.	}
134.#endregion
135. 
136.}

Submission Info

Submission Time
Task A - 石油王Xの憂鬱
User kazuma0824
Language C# (Mono 4.6.2.0)
Score 0
Code Size 2600 Byte
Status CE

Compile Error

./Main.cs(2,0): error CS1525: Unexpected symbol `2'
./Main.cs(26,4): error CS1040: Preprocessor directives must appear as the first non-whitespace character on a line
./Main.cs(42,4): error CS1040: Preprocessor directives must appear as the first non-whitespace character on a line
./Main.cs(43,4): error CS1040: Preprocessor directives must appear as the first non-whitespace character on a line
./Main.cs(60,4): error CS1040: Preprocessor directives must appear as the first non-whitespace character on a line
./Main.cs(61,4): error CS1040: Preprocessor directives must appear as the first non-whitespace character on a line
./Main.cs(71,4): error CS1040: Preprocessor directives must appear as the first non-whitespace character on a line
./Main.cs(89,4): error CS1040: Preprocessor directives must appear as the first non-whitespace character on a line
./Main.cs(134,5): error CS1040: Preprocessor directives must appear as the first non-whitespace character on a line