Last active
December 31, 2015 11:47
-
-
Save NotFounds/cb9b25c5dad105ae3638 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using System.Collections.Generic; | |
using static System.Console; | |
namespace WaterAngel | |
{ | |
public class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
Solve(); | |
} | |
public static void Solve() | |
{ | |
MyInputStream cin = new MyInputStream(); | |
int x = cin.ReadInt(); | |
int y = cin.ReadInt(); | |
WriteLine(x + y); | |
} | |
} | |
public class MyInputStream | |
{ | |
private char SPLIT = ' '; | |
private Queue<string> inputStream; | |
public MyInputStream(char split = ' ') | |
{ | |
SPLIT = split; | |
inputStream = new Queue<string>(); | |
} | |
public string Read() | |
{ | |
if (inputStream.Count != 0) return inputStream.Dequeue(); | |
string[] tmp = Console.ReadLine().Split(SPLIT); | |
for (int i = 0; i < tmp.Length; i++) | |
{ | |
inputStream.Enqueue(tmp[i]); | |
} | |
return inputStream.Dequeue(); | |
} | |
public string ReadLine() | |
{ | |
return Console.ReadLine(); | |
} | |
public int ReadInt() | |
{ | |
return int.Parse(Read()); | |
} | |
public long ReadLong() | |
{ | |
return long.Parse(Read()); | |
} | |
public double ReadDouble() | |
{ | |
return double.Parse(Read()); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment