80182024-01-12 10:28:14Leventusz09Áruszállítás (75 pont)csharpWrong answer 0/75123ms34468 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];
            bool[] R = new bool[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]=true;
                }
            }
            int o1 = 0;
            foreach(bool i in R){
                if (i) o1++;
            }
            Console.WriteLine(o1);
            
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base0/75
1Wrong answer0/030ms22112 KiB
2Runtime error0/068ms34468 KiB
3Wrong answer0/330ms22764 KiB
4Runtime error0/332ms21960 KiB
5Wrong answer0/329ms23280 KiB
6Wrong answer0/329ms23344 KiB
7Wrong answer0/330ms23644 KiB
8Wrong answer0/430ms23724 KiB
9Runtime error0/432ms22612 KiB
10Runtime error0/434ms23068 KiB
11Wrong answer0/430ms23908 KiB
12Wrong answer0/432ms24524 KiB
13Runtime error0/434ms24204 KiB
14Runtime error0/435ms25376 KiB
15Runtime error0/435ms25048 KiB
16Runtime error0/478ms26656 KiB
17Runtime error0/4123ms26944 KiB
18Runtime error0/4118ms27572 KiB
19Runtime error0/434ms25744 KiB
20Runtime error0/434ms26012 KiB
21Runtime error0/461ms34356 KiB
22Runtime error0/445ms30620 KiB