Submission #58226629


Source Code Expand

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

int main(){
  int i;
  long long n,amax=-1000000000,bmax=-1000000000;
  
  cin >> n;
  vector<long long> a(n),b(n) ;

 for(i=0 ;i < n ; i++){
   cin >> a.at(i);
   if(a.at(i)>amax) amax=a.at(i);
 }

 for(i=0 ;i < n ; i++){
   cin >> b.at(i);
   if(b.at(i)>bmax) bmax=b.at(i);

 }

cout << amax+bmax <<endl;
} 

Submission Info

Submission Time
Task C - Max Ai+Bj
User scentream
Language C++ 20 (gcc 12.2)
Score 250
Code Size 378 Byte
Status AC
Exec Time 280 ms
Memory 11176 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 250 / 250
Status
AC × 2
AC × 22
Set Name Test Cases
Sample 00_sample_01.txt, 00_sample_02.txt
All 00_sample_01.txt, 00_sample_02.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt, 02_handmade_01.txt, 02_handmade_02.txt, 02_handmade_03.txt, 02_handmade_04.txt, 02_handmade_05.txt
Case Name Status Exec Time Memory
00_sample_01.txt AC 1 ms 3448 KiB
00_sample_02.txt AC 1 ms 3452 KiB
01_random_01.txt AC 237 ms 10524 KiB
01_random_02.txt AC 256 ms 10980 KiB
01_random_03.txt AC 75 ms 5244 KiB
01_random_04.txt AC 257 ms 10980 KiB
01_random_05.txt AC 88 ms 5708 KiB
01_random_06.txt AC 257 ms 11032 KiB
01_random_07.txt AC 101 ms 6280 KiB
01_random_08.txt AC 260 ms 11176 KiB
01_random_09.txt AC 203 ms 9328 KiB
01_random_10.txt AC 258 ms 11012 KiB
01_random_11.txt AC 234 ms 10148 KiB
01_random_12.txt AC 255 ms 11080 KiB
01_random_13.txt AC 167 ms 8072 KiB
01_random_14.txt AC 256 ms 11080 KiB
01_random_15.txt AC 140 ms 7480 KiB
02_handmade_01.txt AC 1 ms 3648 KiB
02_handmade_02.txt AC 259 ms 10976 KiB
02_handmade_03.txt AC 280 ms 11080 KiB
02_handmade_04.txt AC 271 ms 11032 KiB
02_handmade_05.txt AC 270 ms 10984 KiB