Submission #45163767


Source Code Expand

Copy
// clang-format off
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using lll = __int128_t;
using uint = unsigned int;
using ull = unsigned long long;
using ulll = __uint128_t;
using db = double;
using ldb = long double;
#define il inline
#define mkp make_pair
#define pii pair<int,int>
#define pll pair<long long, long long>
#define fi first
#define se second
#define sq(x) ((x)*(x))
#define For(i,j,k) for(int i=(j); i<=(k); ++i) // NOLINT
#define ForDown(i,j,k) for(int i=(j); i>=(k); --i) // NOLINT
#define pb push_back
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// clang-format off
#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using lll = __int128_t;
using uint = unsigned int;
using ull = unsigned long long;
using ulll = __uint128_t;
using db = double;
using ldb = long double;
#define il inline
#define mkp make_pair
#define pii pair<int,int>
#define pll pair<long long, long long>
#define fi first
#define se second
#define sq(x) ((x)*(x))
#define For(i,j,k) for(int i=(j); i<=(k); ++i) // NOLINT
#define ForDown(i,j,k) for(int i=(j); i>=(k); --i) // NOLINT
#define pb push_back
#define eb emplace_back
#define FileIO(filename) freopen(filename ".in" ,"r",stdin);freopen(filename ".out" ,"w",stdout)
template<typename T> il void read(T &x){ x=0;int f=1;int c=getchar();while(!isdigit(c)){if(c=='-')f=-1;c=getchar();}while(isdigit(c)){x=x*10+c-'0';c=getchar();}x*=f;}
template<typename T, typename ... Args> il void read(T &x, Args &... y){ read(x);read(y...); }
#if __cplusplus < 201400
#warning "Please use c++14 or higher."
template<typename T> il T qpow(T x, ull y, T mod){T ans=1;x%=mod;while(y){if(y&1)(ans*=x)%=mod;(x*=x)%=mod;y>>=1;}return ans;}
template<typename T> il constexpr T qpow(T x, ull y){T ans=1;while(y){if(y&1)ans*=x;x*=x;y>>=1;}return ans;}
#else
template<typename T> il constexpr T qpow(T x, ull y, T mod){T ans=1;x%=mod;while(y){if(y&1)(ans*=x)%=mod;(x*=x)%=mod;y>>=1;}return ans;}
template<typename T> il constexpr T qpow(T x, ull y){T ans=1;while(y){if(y&1)ans*=x;x*=x;y>>=1;}return ans;}
#endif

#ifndef ONLINE_JUDGE
  #define __lg log2
  namespace _Debug {
	  template <typename T> inline void _debug(const char* format, T t) { cerr<<format<<'='<<t<<endl; }
	  template <class First, class... Rest> inline void _debug(const char* format, First first, Rest... rest) { while (*format != ',') cerr << *format++; cerr << '=' << first << ","; _debug(format + 1, rest...);}
	  template <typename T> ostream& operator<<(ostream& os, const vector<T>& V) { os << "[ "; for (const auto& vv : V) os << vv << ", "; os << "]"; return os; }
	  #define debug(...) cerr<<"Line "<<__LINE__<<": ",_debug(#__VA_ARGS__, __VA_ARGS__);
  };
  using namespace _Debug;
#endif

// File head end
// clang-format on

namespace {
// constexpr ll MAXN = ...;
int n, m, p;
il void solver_main() {
  read(n, m, p);
  if (m > n)
    puts("0");
  else
    printf("%d\n", (n - m) / p + 1);
}
}; // namespace

signed main() { return solver_main(), 0; }

Submission Info

Submission Time
Task A - Full Moon
User Moeebius
Language C++ 20 (gcc 12.2)
Score 100
Code Size 2472 Byte
Status AC
Exec Time 2 ms
Memory 3756 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 18
Set Name Test Cases
Sample 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt
All 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 01_test_01.txt, 01_test_02.txt, 01_test_03.txt, 01_test_04.txt, 01_test_05.txt, 01_test_06.txt, 01_test_07.txt, 01_test_08.txt, 01_test_09.txt, 01_test_10.txt, 01_test_11.txt, 01_test_12.txt, 01_test_13.txt, 01_test_14.txt, 01_test_15.txt
Case Name Status Exec Time Memory
00_sample_01.txt AC 1 ms 3620 KB
00_sample_02.txt AC 1 ms 3448 KB
00_sample_03.txt AC 1 ms 3744 KB
01_test_01.txt AC 1 ms 3756 KB
01_test_02.txt AC 1 ms 3580 KB
01_test_03.txt AC 1 ms 3748 KB
01_test_04.txt AC 1 ms 3624 KB
01_test_05.txt AC 1 ms 3624 KB
01_test_06.txt AC 1 ms 3748 KB
01_test_07.txt AC 1 ms 3624 KB
01_test_08.txt AC 1 ms 3620 KB
01_test_09.txt AC 1 ms 3584 KB
01_test_10.txt AC 1 ms 3688 KB
01_test_11.txt AC 1 ms 3752 KB
01_test_12.txt AC 1 ms 3468 KB
01_test_13.txt AC 1 ms 3496 KB
01_test_14.txt AC 1 ms 3632 KB
01_test_15.txt AC 2 ms 3444 KB


2025-02-27 (Thu)
22:50:41 +00:00