Submission #582948

#TimeUsernameProblemLanguageResultExecution timeMemory
582948CyanmondBoarding Passes (BOI22_passes)C++17
5 / 100
3 ms480 KiB
#include <iostream> #include <string> using namespace std; using i64 = long long int; #define ALL(x) (x).begin(), (x).end() #define REP(i, N) for (int i = 0; i < (N); ++i) #define REP_3(i, l, r) for (int i = (l); i < (r); ++i) void answer(const i64 x) { cout << x / 2; if (x % 2 == 1) cout << ".5" << endl; } int main() { string S; cin >> S; const int N = (int)S.size(); i64 sum = 0; REP(i, N) { const int x = min(i, N - i - 1); sum += x; } answer(sum); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...