-
-
Save oyakodon/75a4ead49097ae0e5b96 to your computer and use it in GitHub Desktop.
ARC049で実際に使ったプログラム。 / C#
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; | |
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