Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.IO;
- using System.Threading;
- namespace scred {
- class Program
- {
- static int n;
- static void Main(string[] args)
- {
- String nS = Console.ReadLine();
- n = Convert.ToInt32(nS);
- for (int ni = 1; ni <= n; ni++)
- {
- String cS = Console.ReadLine();
- int c = Convert.ToInt32(cS);
- String iS = Console.ReadLine();
- int i = Convert.ToInt32(iS);
- String[] p = Console.ReadLine().Split(' ');
- for (int a = 1; a <= p.Length-2; a++)
- {
- bool done = false;
- for (int b = 1; b <= p.Length-2; a++)
- {
- if ((Convert.ToInt32(p[a]) + Convert.ToInt32(p[b])) == c)
- {
- Console.WriteLine("Case #" + ni + ": " + a + " " + b);
- Thread.Sleep(1000);
- done = true;
- break;
- }
- else
- {
- done = false;
- }
- }
- if (done) break;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement