Submission #627936
Source Code Expand
using System; using System.Collections.Generic; using System.Linq; class Program { static string ReadLine() { return Console.ReadLine(); } static int ReadInt() { return int.Parse(ReadLine()); } static int[] ReadInts() { return ReadLine().Split().Select(int.Parse).ToArray(); } static string[] ReadStrings() { return ReadLine().Split(); } const int MOD = (int)1e9 + 7; static int CalcNaive(int n, int k) { var dp = new int[n+1, k]; // [駅, 連続して停止した駅数] return 0; /* dp[1, 1] = 1; for (int i = 2; i <= n; i++) { // i 番目の駅 // i 番目の駅で停車する for (int j = 0; j < k-1; j++) { dp[i, j+1] = (dp[i, j+1] + dp[i-1, j]) % MOD; } // i 番目の駅で停車しない for (int j = 0; j < k; j++) { dp[i, 0] = (dp[i, 0] + dp[i-1, j]) % MOD; } } int ans = 0; for (int i = 1; i < k; i++) { ans = (ans + dp[n, i]) % MOD; } return ans; */ } static void Main() { var nk = ReadInts(); int n = nk[0], k = nk[1]; Console.WriteLine(CalcNaive(n, k)); } }
Submission Info
Submission Time | |
---|---|
Task | F - 準急 |
User | noriok |
Language | C# (Mono 2.10.8.1) |
Score | 0 |
Code Size | 1274 Byte |
Status | WA |
Exec Time | 281 ms |
Memory | 84708 KB |
Judge Result
Set Name | All | ||||
---|---|---|---|---|---|
Score / Max Score | 0 / 4 | ||||
Status |
|
Set Name | Test Cases |
---|---|
All | 00, 01, 02, 03, 04, 90, 91 |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00 | WA | 143 ms | 16572 KB |
01 | RE | 124 ms | 8608 KB |
02 | RE | 125 ms | 8608 KB |
03 | RE | 128 ms | 8564 KB |
04 | WA | 281 ms | 84708 KB |
90 | WA | 124 ms | 8800 KB |
91 | WA | 121 ms | 8796 KB |