80172024-01-12 10:24:41Leventusz09Áruszállítás (75 pont)csharpRuntime error 24/75120ms41948 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];
            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/032ms22396 KiB
2Runtime error0/071ms40484 KiB
3Accepted3/329ms23332 KiB
4Runtime error0/334ms22832 KiB
5Accepted3/330ms23884 KiB
6Accepted3/329ms23772 KiB
7Accepted3/330ms24220 KiB
8Accepted4/430ms24404 KiB
9Runtime error0/432ms23264 KiB
10Runtime error0/434ms24256 KiB
11Accepted4/432ms25712 KiB
12Accepted4/434ms25384 KiB
13Runtime error0/434ms25400 KiB
14Runtime error0/437ms26900 KiB
15Runtime error0/435ms26628 KiB
16Runtime error0/479ms29260 KiB
17Runtime error0/4120ms30476 KiB
18Runtime error0/4118ms31568 KiB
19Runtime error0/437ms28740 KiB
20Runtime error0/435ms29796 KiB
21Runtime error0/467ms41948 KiB
22Runtime error0/448ms37584 KiB