Skip to content

Instantly share code, notes, and snippets.

@oyakodon
Created March 19, 2016 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oyakodon/75a4ead49097ae0e5b96 to your computer and use it in GitHub Desktop.
Save oyakodon/75a4ead49097ae0e5b96 to your computer and use it in GitHub Desktop.
ARC049で実際に使ったプログラム。 / C#
using System;
class Program
{
static void Main(string[] args)
{
var S = Console.ReadLine();
var Nums = Console.ReadLine().Split();
var ret = "";
for(var i = 0; i < S.Length; ++i )
{
var matched = false;
foreach(var num in Nums )
{
if (num == i.ToString() )
{
matched = true;
ret += "\"" + S[i];
}
}
if (!matched)
ret += S[i];
}
if (Nums[3] == S.Length.ToString() )
{
ret += "\"";
}
Console.WriteLine(ret);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment