Submission #1065619
Source Code Expand
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication54 { class Program { static void Main(string[] args) { while (true) { int a = int.Parse(Console.ReadLine()); string b = Console.ReadLine(); int[] e = new int[a+1]; int d = 0; e[0] = 0; for (int c = 0; c < a; c++) { if (b[c] == 'I') d++; if (b[c] == 'D') d--; e[c+1] = d; Console.WriteLine(d); } Array.Sort(e); Console.WriteLine(e[e.Length - 1]); } } } }
Submission Info
Submission Time | |
---|---|
Task | B - Increment Decrement |
User | london |
Language | C# (Mono 4.6.2.0) |
Score | 0 |
Code Size | 893 Byte |
Status | RE |
Exec Time | 24 ms |
Memory | 2528 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt |
All | subtask_1_alld_01.txt, subtask_1_alldmax_01.txt, subtask_1_alli_01.txt, subtask_1_allimax_01.txt, subtask_1_max_01.txt, subtask_1_max_02.txt, subtask_1_rand_01.txt, subtask_1_rand_02.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample_01.txt | RE | 24 ms | 2528 KB |
sample_02.txt | RE | 22 ms | 2528 KB |
subtask_1_alld_01.txt | RE | 23 ms | 2528 KB |
subtask_1_alldmax_01.txt | RE | 24 ms | 2528 KB |
subtask_1_alli_01.txt | RE | 23 ms | 2528 KB |
subtask_1_allimax_01.txt | RE | 23 ms | 2528 KB |
subtask_1_max_01.txt | RE | 23 ms | 2528 KB |
subtask_1_max_02.txt | RE | 23 ms | 2400 KB |
subtask_1_rand_01.txt | RE | 23 ms | 2528 KB |
subtask_1_rand_02.txt | RE | 23 ms | 2528 KB |