Submission #3306684


Source Code Expand

/**
 * File    : A.cpp
 * Author  : Kazune Takahashi
 * Created : 2018-9-30 12:32:20
 * Powered by Visual Studio Code
 */

#include <iostream>
#include <iomanip>   // << fixed << setprecision(xxx)
#include <algorithm> // do { } while ( next_permutation(A, A+xxx) ) ;
#include <vector>
#include <string> // to_string(nnn) // substr(m, n) // stoi(nnn)
#include <complex>
#include <tuple>
#include <queue>
#include <stack>
#include <map> // if (M.find(key) != M.end()) { }
#include <set>
#include <functional>
#include <random> // auto rd = bind(uniform_int_distribution<int>(0, 9), mt19937(19920725));
#include <chrono> // std::chrono::system_clock::time_point start_time, end_time;
// start = std::chrono::system_clock::now();
// double elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(end_time-start_time).count();
#include <cctype>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
using namespace std;

#define DEBUG 0 // change 0 -> 1 if we need debug.

typedef long long ll;

// const int dx[4] = {1, 0, -1, 0};
// const int dy[4] = {0, 1, 0, -1};

// const int C = 1e6+10;
// const ll M = 1000000007;

int N;
int s[100010];
int a[100010];

int main()
{
  cin >> N;
  for (auto i = 0; i < N; i++)
  {
    cin >> s[i];
  }
  for (auto i = 0; i < N; i++)
  {
    cin >> a[i];
  }
  int maxi = 0;
  for (auto i = 0; i < N; i++)
  {
    maxi = max(maxi, a[i] * s[i]);
  }
  cout << maxi << endl;
}

Submission Info

Submission Time
Task A - 立て看板
User kazunetakahashi
Language C++14 (GCC 5.4.1)
Score 200
Code Size 1496 Byte
Status AC
Exec Time 1 ms
Memory 256 KB

Judge Result

Set Name All Sample
Score / Max Score 200 / 200 0 / 0
Status
AC × 12
AC × 2
Set Name Test Cases
All random0, random1, random2, random3, random4, random5, random6, random7, random8, random9, sample_01, sample_02
Sample sample_01, sample_02
Case Name Status Exec Time Memory
random0 AC 1 ms 256 KB
random1 AC 1 ms 256 KB
random2 AC 1 ms 256 KB
random3 AC 1 ms 256 KB
random4 AC 1 ms 256 KB
random5 AC 1 ms 256 KB
random6 AC 1 ms 256 KB
random7 AC 1 ms 256 KB
random8 AC 1 ms 256 KB
random9 AC 1 ms 256 KB
sample_01 AC 1 ms 256 KB
sample_02 AC 1 ms 256 KB