80162024-01-12 10:23:31Leventusz09Áruszállítás (75 pont)csharpRuntime error 24/75182ms40988 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/030ms22352 KiB
2Runtime error0/071ms40204 KiB
3Accepted3/329ms22964 KiB
4Runtime error0/332ms22684 KiB
5Accepted3/329ms23420 KiB
6Accepted3/329ms23692 KiB
7Accepted3/329ms23912 KiB
8Accepted4/432ms24008 KiB
9Runtime error0/435ms23276 KiB
10Runtime error0/432ms23484 KiB
11Accepted4/432ms24448 KiB
12Accepted4/434ms25400 KiB
13Runtime error0/435ms25320 KiB
14Runtime error0/435ms26732 KiB
15Runtime error0/435ms26532 KiB
16Runtime error0/4109ms28780 KiB
17Runtime error0/4182ms29916 KiB
18Runtime error0/4173ms31332 KiB
19Runtime error0/435ms28316 KiB
20Runtime error0/435ms29080 KiB
21Runtime error0/464ms40988 KiB
22Runtime error0/446ms36784 KiB