Submission #1941432


Source Code Expand

#include<bits/stdc++.h>
using namespace std;
using Int = long long;
signed main(){
  int n,q;
  cin>>n>>q;
  for(int i=0;i<q;i++){
    int a,b,s,t;
    cin>>a>>b>>s>>t;
    int o=min(b,t)-max(a,s);
    cout<<(t-s-max(0,o))*100<<endl;
  }
  return 0;
}

Submission Info

Submission Time
Task D - 定期券
User beet
Language C++14 (GCC 5.4.1)
Score 100
Code Size 266 Byte
Status AC
Exec Time 310 ms
Memory 1024 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 2
AC × 16
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
All large_01.txt, large_02.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, sample_01.txt, sample_02.txt, small_01.txt, small_02.txt
Case Name Status Exec Time Memory
large_01.txt AC 155 ms 640 KB
large_02.txt AC 300 ms 1024 KB
random_01.txt AC 305 ms 896 KB
random_02.txt AC 299 ms 896 KB
random_03.txt AC 302 ms 896 KB
random_04.txt AC 302 ms 896 KB
random_05.txt AC 297 ms 896 KB
random_06.txt AC 303 ms 896 KB
random_07.txt AC 310 ms 896 KB
random_08.txt AC 301 ms 896 KB
random_09.txt AC 305 ms 896 KB
random_10.txt AC 309 ms 896 KB
sample_01.txt AC 1 ms 256 KB
sample_02.txt AC 1 ms 256 KB
small_01.txt AC 1 ms 256 KB
small_02.txt AC 1 ms 256 KB