Submission #1734809
Source Code Expand
#include<iostream> #include<cstdio> #include<cmath> #include<cstring> #include<string> #include<stack> #include<queue> #include<vector> #include<algorithm> #include<iomanip> typedef long long int ll; using namespace std; #define FOR(i,a,b) for (int i=(a);i<(b);i++) #define REP(i,n) for (int i=0;i<(n);i++) #define EREP(i,n) for (int i=1;i<=(n);i++) #define ALL(a) (a).begin(),(a).end() #define EVEL 1 #ifndef EVEL #define DEB(X) cout << #X << ":" <<X<<" " ; #define TF(f) f ? cout<<"true " : cout<<"false "; #define END cout<<"\n"; #else #define DEB(X) {} #define TF(f) {} #define END {} #endif int N,A,B,X[100001]; ll ans=0; int main(){ cin>>N>>A>>B; REP(i,N)cin>>X[i]; REP(i,N-1){ ans+=min((X[i+1]-X[i])*A,B); } cout<<ans<<endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - Two Rectangles |
User | Nafmo2 |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 823 Byte |
Status | WA |
Exec Time | 1 ms |
Memory | 256 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 100 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt |
All | sample_01.txt, sample_02.txt, subtask_1_abmax_01.txt, subtask_1_allmax_01.txt, subtask_1_cdmax_01.txt, subtask_1_rand_01.txt, subtask_1_rand_02.txt, subtask_1_rand_03.txt, subtask_1_same_01.txt, subtask_1_same_02.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample_01.txt | WA | 1 ms | 256 KB |
sample_02.txt | WA | 1 ms | 256 KB |
subtask_1_abmax_01.txt | WA | 1 ms | 256 KB |
subtask_1_allmax_01.txt | WA | 1 ms | 256 KB |
subtask_1_cdmax_01.txt | WA | 1 ms | 256 KB |
subtask_1_rand_01.txt | WA | 1 ms | 256 KB |
subtask_1_rand_02.txt | WA | 1 ms | 256 KB |
subtask_1_rand_03.txt | WA | 1 ms | 256 KB |
subtask_1_same_01.txt | WA | 1 ms | 256 KB |
subtask_1_same_02.txt | WA | 1 ms | 256 KB |