Submission #3434016


Source Code Expand

#include<iostream>
#include<vector>
#include<algorithm>
#include<cctype>
#include<utility>
#include<string>
#include<cmath>
#include <numeric>
 
 
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;
typedef pair<int, int> P;
typedef pair<llong, llong> LP;
typedef pair<int, P> PP;
typedef pair<llong, LP> LPP;
 
typedef long long int ll;
#define ARRAY_MAX 100005


int main(){

    ll a,b,c;
    cin >> a >> b >> c;
    ll ans = INF;
    for(ll i = 1;i <= a/2;i++){
        ans = min(ans, abs(i-(a-i))*b*c);
    }

    for(ll i = 1;i <= b/2;i++){
        ans = min(ans, abs(i-(b-i))*a*c);
    }
    for(ll i = 1;i <= c/2;i++){
        ans = min(ans, abs(i-(c-i))*a*b);
    }
    cout << ans << endl;
   
    

    return 0;
}

Submission Info

Submission Time
Task A - Divide a Cuboid
User punipuni
Language C++14 (GCC 5.4.1)
Score 0
Code Size 1074 Byte
Status TLE
Exec Time 2103 ms
Memory 256 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 200
Status
AC × 3
AC × 3
TLE × 6
Set Name Test Cases
Sample 0_00.txt, 0_01.txt, 0_02.txt
All 0_00.txt, 0_01.txt, 0_02.txt, 1_00.txt, 1_01.txt, 1_02.txt, 1_03.txt, 1_04.txt, 1_05.txt
Case Name Status Exec Time Memory
0_00.txt AC 1 ms 256 KB
0_01.txt AC 1 ms 256 KB
0_02.txt AC 1 ms 256 KB
1_00.txt TLE 2103 ms 256 KB
1_01.txt TLE 2103 ms 256 KB
1_02.txt TLE 2103 ms 256 KB
1_03.txt TLE 2103 ms 256 KB
1_04.txt TLE 2103 ms 256 KB
1_05.txt TLE 2103 ms 256 KB