80212024-01-12 10:32:13Leventusz09Áruszállítás (75 pont)csharpRuntime error 24/75122ms41308 KiB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Áruszállítás{
    class Program{
        static void Main(){
            string[] in1 = Console.ReadLine().Split();
            int N = int.Parse(in1[0]);
            int M = int.Parse(in1[1]);
            int[] F = new int[M];
            int[] T = new int[M];
            if (N == 1){Console.WriteLine(0);return;}
            int[] R = new int[N-1];

            int[] temp;
            for(int i=0, j; i<M; i++){
                temp = Console.ReadLine().Split().Select(int.Parse).ToArray();
                /*F[i] = temp[0];
                T[i] = temp[1];*/
                for(j=temp[0]; j < temp[1]; j++){
                    R[j]++;
                }
            }
            int o1 = 0;
            foreach(int i in R){
                if (i == 0) o1++;
            }
            Console.WriteLine(o1);
            
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base24/75
1Accepted0/032ms22288 KiB
2Runtime error0/070ms40316 KiB
3Accepted3/330ms23048 KiB
4Runtime error0/332ms22312 KiB
5Accepted3/332ms23708 KiB
6Accepted3/329ms23792 KiB
7Accepted3/329ms24148 KiB
8Accepted4/429ms24108 KiB
9Runtime error0/432ms23540 KiB
10Runtime error0/432ms23896 KiB
11Accepted4/430ms25436 KiB
12Accepted4/432ms25708 KiB
13Runtime error0/435ms25908 KiB
14Runtime error0/437ms27004 KiB
15Runtime error0/437ms26836 KiB
16Runtime error0/479ms29328 KiB
17Runtime error0/4122ms30564 KiB
18Runtime error0/4119ms31952 KiB
19Runtime error0/435ms28820 KiB
20Runtime error0/435ms29588 KiB
21Runtime error0/463ms41308 KiB
22Runtime error0/448ms37032 KiB