Submission #1341127


Source Code Expand

#include <bits/stdc++.h>
 
using namespace std;
 
typedef long long ll;

#define mp make_pair
#define pb push_back
#define mp make_pair

bool graph[1000][1000];

vector<int>g[100100];


int main(){
    ll r,g,b,n,mx = 1,mn = 1000;
    cin>>n;
    std::vector<int> v;
    for(int i = 0; i < n;i++){
        cin>>g;
        if(g > mx){
            mx = g;
        }
        if(g < mn){
            mn = g;
        }
    }
    cout<<mx - mn;

    return 0;

}

Submission Info

Submission Time
Task B - Traveling AtCoDeer Problem
User nusmailov
Language C++14 (GCC 5.4.1)
Score 200
Code Size 490 Byte
Status AC
Exec Time 2 ms
Memory 2560 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 2
AC × 6
Set Name Test Cases
Sample s1.txt, s2.txt
All in1.txt, in2.txt, in3.txt, in4.txt, s1.txt, s2.txt
Case Name Status Exec Time Memory
in1.txt AC 2 ms 2560 KB
in2.txt AC 2 ms 2560 KB
in3.txt AC 2 ms 2560 KB
in4.txt AC 2 ms 2560 KB
s1.txt AC 2 ms 2560 KB
s2.txt AC 2 ms 2560 KB