Skip to content

Instantly share code, notes, and snippets.

@sakapon
Created June 4, 2021 06:53
Show Gist options
  • Save sakapon/53f90c1d1b3fa5584393e643c05238d5 to your computer and use it in GitHub Desktop.
Save sakapon/53f90c1d1b3fa5584393e643c05238d5 to your computer and use it in GitHub Desktop.
競プロ典型 90 問 / Q052
using System;
using System.Linq;
class Q052
{
const long M = 1000000007;
static long[] ReadL() => Array.ConvertAll(Console.ReadLine().Split(), long.Parse);
static void Main()
{
var n = int.Parse(Console.ReadLine());
Console.WriteLine(new bool[n].Select(_ => ReadL().Sum()).Aggregate((x, y) => x * y % M));
}
}
@sakapon
Copy link
Author

sakapon commented Jun 4, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment