Skip to content

Instantly share code, notes, and snippets.

View azhidkov's full-sized avatar
🐈

azhidkov azhidkov

🐈
  • Moscow, Russia
View GitHub Profile
@azhidkov
azhidkov / Main.java
Last active October 9, 2021 15:49
Java competitive programming template
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
InputReader in = new InputReader(System.in);
PrintWriter out = new PrintWriter(System.out);
new Task().solve(in, out);
out.close();
}
public static class ListExtenstions
{
public static void AddRange<T>(this IList<T> source, IList<T> second)
{
foreach (var it in second)
{
source.Add(it);
}
}
}
[Test]
public void AddRangeTest()
{
IList<int> lst1 = new List<int>{1, 2, 3, 4, 5};
IList<int> lst2 = new List<int> {9, 8, 7, 6};
lst1.AddRange(lst2);
Assert.That(lst1.Count, Is.EqualTo(9));
}