criyle/codenet-compile-errors huggingface dataset:
Language: C

#include <bits/stdc++.h>
typedef long long ll;
using namespace std;

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	ll t,n,m,a,b;
	cin>>t;
	for(ll i=0;i<t;i++){
		cin>>n>>m>>a>>b;
		ll sum=0;
		for(ll j=0;j<n;j++){
			sum+=(a*j+b)/m;
		}
		cout<<sum<<endl;
	}
	return 0;
}


Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
#define ll long long
#define ld long double
#define REP(i,m,n) for(int i=(int)(m); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)
#define RREP(i,m,n) for(int i=(int)(m); i>=(int)(n); i--)
#define rrep(i,n) RREP(i,(n)-1,0)
#define all(v) v.begin(), v.end()
#define endk '\n'
const int inf = 1e9+7;
const ll longinf = 1LL<<60;
const ll mod = 1e9+7;
const ll mod2 = 998244353;
const ld eps = 1e-10;
template<typename T1, typename T2> inline void chmin(T1 &a, T2 b){if(a>b) a=b;}
template<typename T1, typename T2> inline void chmax(T1 &a, T2 b){if(a<b) a=b;}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int t; cin >> t;
  while(t--) {
    ll n, m, a, b;
    cin >> n >> m >> a >> b;
    cout << floor_sum(n, m, a, b) << endk;
  }
  return 0;
}


Compiler output:
a.cc:3:10: fatal error: atcoder/all: No such file or directory
    3 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <iomanip>
#include<math.h>
#include<list>
#include <algorithm>
#include<set>
#include<vector>
#include<math.h>
#include<map>
#include<string>
#include <numeric>
#include <queue>
#include <sstream>
#include <bitset>
#include<stack>
#include<functional>
#include<unordered_set>
#include<unordered_map>
#include<atcoder/all>

using ll=long long;
#define rep(i,s,e) for(ll i=s;i<e;i++)
#define repeq(i,s,e) for(ll i=s;i<=e;i++)

using namespace std;
int main()
{
	int T;
	cin >> T;
	rep(i,0,T) {
		long long N, M, A, B;
		cin >> N >> M >> A >> B;
		cout << atcoder::floor_sum(N, M, A, B) << endl;
	}
	return 0;
}



Compiler output:
a.cc:19:9: fatal error: atcoder/all: No such file or directory
   19 | #include<atcoder/all>
      |         ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#define _DEBUG
#include "bits/stdc++.h"
#include <atcoder/all>
#define CHOOSE(a) CHOOSE2 a
#define CHOOSE2(a0,a1,a2,a3,a4,x,...) x
#define debug_1(x1) cout<<#x1<<": "<<x1<<endl
#define debug_2(x1,x2) cout<<#x1<<": "<<x1<<", "#x2<<": "<<x2<<endl
#define debug_3(x1,x2,x3) cout<<#x1<<": "<<x1<<", "#x2<<": "<<x2<<", "#x3<<": "<<x3<<endl
#define debug_4(x1,x2,x3,x4) cout<<#x1<<": "<<x1<<", "#x2<<": "<<x2<<", "#x3<<": "<<x3<<", "#x4<<": "<<x4<<endl
#define debug_5(x1,x2,x3,x4,x5) cout<<#x1<<": "<<x1<<", "#x2<<": "<<x2<<", "#x3<<": "<<x3<<", "#x4<<": "<<x4<<", "#x5<<": "<<x5<<endl
#ifdef _DEBUG
#define debug(...) CHOOSE((__VA_ARGS__,debug_5,debug_4,debug_3,debug_2,debug_1,~))(__VA_ARGS__)
#else
#define debug(...)
#endif
#define rep(index,num) for(int index=0;index<(int)num;index++)
#define rep1(index,num) for(int index=1;index<=(int)num;index++)
#define brep(index,num) for(int index=(int)num-1;index>=0;index--)
#define brep1(index,num) for(int index=(int)num;index>0;index--)
#define scan(argument) cin>>argument
#define prin(argument) cout<<argument<<endl
#define kaigyo cout<<endl
#define eps 1e-7
#define mp(a1,a2) make_pair(a1,a2)
#define ALL(a) (a).begin(),(a).end()
#define rALL(a) (a).rbegin(),(a).rend()
typedef long long ll;
typedef long double ld;
using namespace std;
using namespace atcoder;
typedef pair<ll,ll> pll;
typedef pair<int,int> pint;
typedef vector<int> vint;
typedef vector<ll> vll;
typedef vector<pint> vpint;
typedef vector<pll> vpll;
ll INFl=(ll)1e+18+1;
int INF=1e+9+1;
int main(){
	int T;
	scan(T);
	rep(t,T){
		int N,M,A,B;
		scan(N>>M>>A>>B);
		prin(floor_sum(N,M,A,B));
	}
	return 0;
}


Compiler output:
a.cc:3:10: fatal error: atcoder/all: No such file or directory
    3 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

typedef long long ll;
#include <bits/stdc++.h>
using namespace std;

ll floor_sum(ll n,ll m,ll a,ll b){
  ll ans=0;
  if(a>=m){
    ans+=(n-1)*n*(a/m)/2;
    a%=m;
  }
  if(b>=m){
    ans+=n*(b/m);
    b%=m;
  }

  ll y_max=(a*n+b)/m;
  if(y_max==0) return ans;
  ans+=floor_sum(y_max,a,m,a*n-y_max*m+b);
  return ans;
}

int main(){
  int t;
  cin>>t;
  
  rep(i,t){
    int n,m,a,b;
    cin>>n>>m>>a>>b;
  
    cout<<floor_sum(n,m,a,b)<<'\n';
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:7: error: 'i' was not declared in this scope
   26 |   rep(i,t){
      |       ^
a.cc:26:3: error: 'rep' was not declared in this scope
   26 |   rep(i,t){
      |   ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

ll floor_sum(ll n,ll m,ll a,ll b){
  ll ans=0;
  if(a>=m){
    ans+=(n-1)*n*(a/m)/2;
    a%=m;
  }
  if(b>=m){
    ans+=n*(b/m);
    b%=m;
  }

  ll y_max=(a*n+b)/m;
  if(y_max==0) return ans;
  ans+=floor_sum(y_max,a,m,a*n-y_max*m+b);
  return ans;
}

int main(){
  int t;
  cin>>t;
  
  rep(i,t){
    int n,m,a,b;
    cin>>n>>m>>a>>b;
  
    cout<<floor_sum(n,m,a,b)<<'\n';
  }
  
  return 0;
}

Compiler output:
a.cc:4:1: error: 'll' does not name a type
    4 | ll floor_sum(ll n,ll m,ll a,ll b){
      | ^~
a.cc: In function 'int main()':
a.cc:25:7: error: 'i' was not declared in this scope
   25 |   rep(i,t){
      |       ^
a.cc:25:3: error: 'rep' was not declared in this scope
   25 |   rep(i,t){
      |   ^~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
using namespace std;
using ll = long long ;
using P = pair<int,int> ;
using pll = pair<long long,long long>;
constexpr int INF = 1e9;
constexpr long long LINF = 1e17;
constexpr int MOD = 1000000007;
constexpr double PI = 3.14159265358979323846;

#include <atcoder/all>
using namespace atcoder;

int main(){
    int t;
    scanf("%d",&t);
    while(t--){
        int n,m,a,b;
        scanf("%d%d%d%d",&n,&m,&a,&b);
        printf("%lld\n",floor_sum(n,m,a,b));
    }
}

Compiler output:
a.cc:12:10: fatal error: atcoder/all: No such file or directory
   12 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
typedef long long ll;
#define rep(i, n) for(ll i = 0, i##_len = (n); i < i##_len; i++)
#define reps(i, s, n) for(ll i = (s), i##_len = (n); i < i##_len; i++)
#define rrep(i, n) for(ll i = (n) - 1; i >= 0; i--)
#define rreps(i, e, n) for(ll i = (n) - 1; i >= (e); i--)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(x) ((ll)(x).size())
#define len(x) ((ll)(x).length())
#define endl "\n"
template<class T> void chmax(T &a, const T b){ a = max(a, b); }
template<class T> void chmin(T &a, const T b){ a = min(a, b); }

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    // ifstream in("input.txt");
    // cin.rdbuf(in.rdbuf());
    ll t;
    cin >> t;
    rep(i, t) {
        ll n, m, a, b;
        cin >> n >> m >> a >> b;
        cout << floor_sum(n, m, a, b) << endl;
    }
    return 0;
}


Compiler output:
a.cc:2:10: fatal error: atcoder/all: No such file or directory
    2 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>

typedef long long int lli;
typedef unsigned long long int ulli;
typedef long double ldb;

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define pb push_back
#define popb pop_back()
#define pf push_front
#define popf pop_front()
#define si size()
#define be begin()
#define en end()
#define all(v) v.be, v.en
#define le length()
#define mp make_pair
#define mt make_tuple
#define acc(v) accumulate(all(v), 0)
#define F first
#define S second
#define INF lli(1e19)

#define forz(i, n) for (lli i = 0; i < n; i++)
#define fore(i, m, n) for (lli i = m; i < n; i++)
#define rforz(i, n) for (lli i = n - 1; i >= 0; i--)
#define rfore(i, m, n) for (lli i = n - 1; i >= m; i--)
#define deci(n) fixed << setprecision(n)
#define high(n) __builtin_popcount(n)
#define highll(n) __builtin_popcountll(n)
#define parity(n) __builtin_parity(n)
#define ctz(n) __builtin_ctz(n)
#define lb lower_bound
#define ub upper_bound
#define er equal_range
#define maxe *max_element
#define mine *min_element
#define mod 1000000007
#define mod2 998244353
#define gcd __gcd
#define kira ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define newline cout<<endl;
//#define endl "\n"



inline lli power(lli x, lli y, lli p = mod)
{
    lli res = 1;
    x = x % p;
    while (y > 0)
    {
        if (y & 1)
            res = (res * x) % p;
        y = y >> 1;
        x = (x * x) % p;
    }
    return res;
}

inline lli modadd(lli a, lli b, lli m = mod)
{
    a += b;
    if (a >= m)
        a -= m;
    return a;
}

inline lli modmul(lli a, lli b, lli m = mod)
{
    return ((a % m) * (b % m)) % m;
}

inline lli modi(lli a, lli m = mod) { return power(a, m - 2, m); }
inline lli md(lli x) {if(x>=0)return x; return -x;}
///////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////
const lli mxN = 5e5;
lli n,m,k,r;
//lli u, v;
//bool vis[mxN];
//vector<lli> adj[mxN];
//void init()
//{
//    forz(i,n) vis[i]=0, adj[i].clear();
//}
//struct ft{
//    lli a[mxN+1];
//    void upd(lli p, lli x)
//    {
//        for(int i = p; i<n+1; i+=i&-i)
//            a[i]+=x;
//    }
//    lli qr(lli x)
//    {
//        lli z = 0;
//        for(int i = x; i>0; i-=i&-i)
//            z+=a[i];
//        return z;
//    }
//} t;

int32_t main()
{
    kira;

    lli T=1;
    cin>>T;

    while(T--)
    {
        cin>>n>>m>>a>>b;
        cout<<(n*b)/m+((n*(n-1)*a)/2)/m+((n*b)%m+((n*(n-1)*a)/2)%m)/m<<endl;
    }

    return 0;

}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:115:20: error: 'a' was not declared in this scope
  115 |         cin>>n>>m>>a>>b;
      |                    ^
a.cc:115:23: error: 'b' was not declared in this scope
  115 |         cin>>n>>m>>a>>b;
      |                       ^
Language: C++

#import<bits/stdc++.h>
#import <atcoder/all>
int T, n, m, a, b;
class FastIO
{
    static const int rdata_sz = (1 << 25), wdata_sz = (1 << 25);
    char rdata[rdata_sz], wdata[wdata_sz], *rb, *wb;
    char tmp_s[20];

public:
    FastIO()
    {
        fread(rdata, 1, rdata_sz, stdin);
        rb = rdata;
        wb = wdata;
    }
    ~FastIO()
    {
        fwrite(wdata, 1, wb - wdata, stdout);
    }

    template <typename T>
    inline void read(T &x)
    {
        bool neg = false;
        x = 0;
        while ((*rb < '0' || *rb > '9') && *rb != '-')
            ++rb;
        if (*rb == '-')
        {
            neg = true;
            ++rb;
        }
        while ('0' <= *rb && *rb <= '9')
        {
            x = 10 * x + (*rb - '0');
            ++rb;
        }
        if (neg)
            x = -x;
    }

#define pc(x) *(wb++) = x
    template <typename T>
    inline void write(T x)
    {
        if (x == 0)
        {
            pc('0');
            pc('\n');
            return;
        }
        if (x < 0)
        {
            pc('-');
            x = -x;
        }
        char *t = tmp_s;
        while (x)
        {
            T y = x / 10;
            *(t++) = (x - y * 10) + '0';
            x = y;
        }
        while (t != tmp_s)
            pc(*(--t));
        pc('\n');
    }
#undef pc
};
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    FastIO io;
    io.read(T);
    for (int i = 0; i < T; i++)
    {
        io.read(n);
        io.read(m);
        io.read(a);
        io.read(b);
        io.write(atcoder::floor_sum(n, m, a, b));
    }
}


Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<bits/stdc++.h>
      |  ^~~~~~
a.cc:2:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    2 | #import <atcoder/all>
      |  ^~~~~~
a.cc:2:9: fatal error: atcoder/all: No such file or directory
    2 | #import <atcoder/all>
      |         ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#import <atcoder/all>
int T, n, m, a, b;
class FastIO
{
    static const int rdata_sz = (1 << 25), wdata_sz = (1 << 25);
    char rdata[rdata_sz], wdata[wdata_sz], *rb, *wb;
    char tmp_s[20];

public:
    FastIO()
    {
        fread(rdata, 1, rdata_sz, stdin);
        rb = rdata;
        wb = wdata;
    }
    ~FastIO()
    {
        fwrite(wdata, 1, wb - wdata, stdout);
    }

    template <typename T>
    inline void read(T &x)
    {
        bool neg = false;
        x = 0;
        while ((*rb < '0' || *rb > '9') && *rb != '-')
            ++rb;
        if (*rb == '-')
        {
            neg = true;
            ++rb;
        }
        while ('0' <= *rb && *rb <= '9')
        {
            x = 10 * x + (*rb - '0');
            ++rb;
        }
        if (neg)
            x = -x;
    }

#define pc(x) *(wb++) = x
    template <typename T>
    inline void write(T x)
    {
        if (x == 0)
        {
            pc('0');
            pc('\n');
            return;
        }
        if (x < 0)
        {
            pc('-');
            x = -x;
        }
        char *t = tmp_s;
        while (x)
        {
            T y = x / 10;
            *(t++) = (x - y * 10) + '0';
            x = y;
        }
        while (t != tmp_s)
            pc(*(--t));
        pc('\n');
    }
#undef pc
};
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    FastIO io;
    io.read(T);
    for (int i = 0; i < T; i++)
    {
        io.read(n);
        io.read(m);
        io.read(a);
        io.read(b);
        io.write(atcoder::floor_sum(n, m, a, b));
    }
}

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import <atcoder/all>
      |  ^~~~~~
a.cc:1:9: fatal error: atcoder/all: No such file or directory
    1 | #import <atcoder/all>
      |         ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#niclude <bits/stdc++.h>
using namespace std;

#defile ll long long

ll fun(int N,int M,int A,int B){
  ll ans=0;
  for(int i=0;i<N;i++){
    ans += (A*i+B) /M;
  }
  return ans;
}

int main(){
  int N,M,A,B;
  ll ans = 0;
  int T;
  cin >> T;
  for(int i=0;i<T;i++){
    cin >> N >> M >> A >> B;
    cout << fun(N,M,A,B) << endl;
  }
  return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #niclude; did you mean #include?
    1 | #niclude <bits/stdc++.h>
      |  ^~~~~~~
      |  include
a.cc:4:2: error: invalid preprocessing directive #defile; did you mean #define?
    4 | #defile ll long long
      |  ^~~~~~
      |  define
a.cc:6:1: error: 'll' does not name a type
    6 | ll fun(int N,int M,int A,int B){
      | ^~
a.cc: In function 'int main()':
a.cc:16:3: error: 'll' was not declared in this scope
   16 |   ll ans = 0;
      |   ^~
a.cc:18:3: error: 'cin' was not declared in this scope
   18 |   cin >> T;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #niclude <bits/stdc++.h>
a.cc:21:5: error: 'cout' was not declared in this scope
   21 |     cout << fun(N,M,A,B) << endl;
      |     ^~~~
a.cc:21:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:21:13: error: 'fun' was not declared in this scope
   21 |     cout << fun(N,M,A,B) << endl;
      |             ^~~
a.cc:21:29: error: 'endl' was not declared in this scope
   21 |     cout << fun(N,M,A,B) << endl;
      |                             ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #niclude <bits/stdc++.h>
Language: C++

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;

using ll = long long;
using ld  = long double;
using pll = pair<ll, ll>;
using pld = pair<ld, ld>;
const int INF=1e9+7;
const ll LINF=9223372036854775807;
const ll MOD=1e9+7;
const ld PI=acos(-1);
const ld EPS = 1e-10; //微調整用（EPSより小さいと0と判定など）

int ii() { int x; if (scanf("%d", &x)==1) return x; else return 0; }
long long il() { long long x; if (scanf("%lld", &x)==1) return x; else return 0; }
string is() { string x; cin >> x; return x; }
char ic() { char x; cin >> x; return x; }
void oi(int x) { printf("%d ", x); }
void ol(long long x) { printf("%lld ", x); }
void od_nosp(double x) { printf("%.15f", x); } // 古い問題用
void od(double x) { printf("%.15f ", x); }
// long doubleで受け取り、fをLfなどに変えて出力すると、変な数値が出る
// それをなんとかするには独自の出力を作らなければならなそう
void os(const string &s) { printf("%s ", s.c_str()); }
void oc(const char &c) { printf("%c ", c); }
#define o_map(v){cerr << #v << endl; for(const auto& xxx: v){cout << xxx.first << " " << xxx.second << "\n";}} //動作未確認
void br() { putchar('\n'); }

// #define gcd __gcd //llは受け取らない C++17~のgcdと違うので注意
// int lcm(int a, int b){return a / gcd(a, b) * b;}
#define b_e(a) a.begin(),a.end() //sort(b_e(vec));
#define REP(i,m,n) for(ll i=(ll)(m) ; i < (ll)(n) ; i++ )
#define DREP(i,m,n) for(ll i=(ll)(m) ; i > (ll)(n) ; i-- )
#define rep(i,n) REP(i,0,n)
#define m_p(a,b) make_pair(a,b)
#define p_b push_back
#define SZ(x) ((ll)(x).size()) //size()がunsignedなのでエラー避けに
#define endk '\n'


// coutによるpairの出力（空白区切り）
template<typename T1, typename T2> ostream& operator<<(ostream& s, const pair<T1, T2>& p) {return s << "(" << p.first << " " << p.second << ")";}
// coutによるvectorの出力（空白区切り）
template<typename T> ostream& operator<<(ostream& s, const vector<T>& v) {
  int len = v.size();
  for (int i = 0; i < len; ++i) {
    s << v[i]; if (i < len - 1) s << " "; //"\t"に変えるとTabで見やすく区切る
  }
  return s;
}
// coutによる多次元vectorの出力（空白区切り）
template<typename T> ostream& operator<<(ostream& s, const vector< vector<T> >& vv) {
  int len = vv.size();
  for (int i = 0; i < len; ++i) {
    s << vv[i] << endl;
  }
  return s;
}

//最大値、最小値の更新。更新したor等しければtrueを返す
template<typename T>
bool chmax(T& a, T b){return (a = max(a, b)) == b;}
template<typename T>
bool chmin(T& a, T b){return (a = min(a, b)) == b;}

//4近傍（上下左右） rep(i, 2) にすると右・下だけに進む
vector<int> dx_4 = {1, 0, -1, 0};
vector<int> dy_4 = {0, 1, 0, -1};

// -------- template end - //


// - library ------------- //


// --------- library end - //



int main(){

  ll T = il();

  rep(i, T){
    ll n, m, a, b;
    cin >> n >> m >> a >> b;

    cout << floor_sum(n, m, a, b) << endk;
  }



}



Compiler output:
a.cc:2:10: fatal error: atcoder/all: No such file or directory
    2 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
//g++ hoge.cpp -I . で実行
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
typedef long long ll;
typedef pair<ll,ll> prl;
typedef vector<ll> vcl;
typedef map<ll,ll> mapl;
typedef unordered_map<ll,ll> umap;
#define pb push_back
#define all(v) v.begin(), v.end()
#define rep(i,a,b) for(ll i=a;i<=b;i++)
#define repi(i,a,b) for(int i=a;i<=b;i++)
#define repr(i,a,b) for(ll i=a;i>=b;i--)
#define reps(i,v) for(ll i=0;i<v.size();i++)
template<typename T> void chmin(T &a, const T &b) { a = min(a, b); }
template<typename T> void chmax(T &a, const T &b) { a = max(a, b); }
const ll mod = 1e9+7;

int main() {
    // your code goes here
    int t;
    scanf("%d", &t);
    for (int i = 0; i < t; i++) {
        long long n, m, a, b;
        scanf("%lld %lld %lld %lld", &n, &m, &a, &b);
        printf("%lld\n", floor_sum(n, m, a, b));
    }
    return 0;
}

Compiler output:
a.cc:2:10: fatal error: atcoder/all: No such file or directory
    2 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <atcoder/math>
#include <cstdio>

using namespace std;
using namespace atcoder;

int main() {
    int t;
    scanf("%d", &t);
    for (int i = 0; i < t; i++) {
        long long n, m, a, b;
        scanf("%lld %lld %lld %lld", &n, &m, &a, &b);
        printf("%lld\n", floor_sum(n, m, a, b));
    }
    return 0;
}


Compiler output:
a.cc:1:10: fatal error: atcoder/math: No such file or directory
    1 | #include <atcoder/math>
      |          ^~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<atcoder/math>
#include<iostream>

using namespace std;
using namespace atcoder;

int main(){
    int T;
    cin >> T;
    long long sum = 0;
    for(int i = 0; i < T; i++){
        int N,M,A,B;
        cin >> N >> M >> A >> B;
        cout << floor_sum(N,M,A,B) << endl;
    }
    return 0;
}

Compiler output:
a.cc:1:9: fatal error: atcoder/math: No such file or directory
    1 | #include<atcoder/math>
      |         ^~~~~~~~~~~~~~
compilation terminated.
Language: C++

//#define _GLIBCXX_DEBUG
#pragma GCC diagnostic ignored "-Wall"
#pragma GCC diagnostic ignored "-Wextra"
#pragma GCC diagnostic ignored "-Wconversion"
#pragma GCC diagnostic ignored "-Wpedantic"
#include "atcoder/all"
#pragma GCC diagnostic warning "-Wall"
#pragma GCC diagnostic warning "-Wextra"
#pragma GCC diagnostic warning "-Wconversion"
#pragma GCC diagnostic warning "-Wpedantic"
#include <bits/stdc++.h>
#define int long long
#define ll long long
using ull = unsigned long long;
using namespace std;
using namespace atcoder;
#define dump(x)                             \
    if (dbg) {                              \
        cerr << #x << " = " << (x) << endl; \
    }
#define overload4(_1, _2, _3, _4, name, ...) name
#define FOR1(n) for (ll i = 0; i < (n); ++i)
#define FOR2(i, n) for (ll i = 0; i < (n); ++i)
#define FOR3(i, a, b) for (ll i = (a); i < (b); ++i)
#define FOR4(i, a, b, c) for (ll i = (a); i < (b); i += (c))
#define FOR(...) overload4(__VA_ARGS__, FOR4, FOR3, FOR2, FOR1)(__VA_ARGS__)
#define FORR(i, a, b) for (int i = (a); i <= (b); ++i)
#define bit(n, k) (((n) >> (k)) & 1) /*nのk bit目*/
namespace mydef {
const int INF = 1ll << 60;
const int MOD = 1e9 + 7;
template <class T>
bool chmin(T& a, const T& b) {
    if (a > b) {
        a = b;
        return 1;
    } else
        return 0;
}
template <class T>
bool chmax(T& a, const T& b) {
    if (a < b) {
        a = b;
        return 1;
    } else
        return 0;
}
void Yes(bool flag = true) {
    if (flag)
        cout << "Yes" << endl;
    else
        cout << "No" << endl;
}
void No(bool flag = true) {
    Yes(!flag);
}
void YES(bool flag = true) {
    if (flag)
        cout << "YES" << endl;
    else
        cout << "NO" << endl;
}
void NO(bool flag = true) {
    YES(!flag);
}
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T& val) {
    std::fill((T*)array, (T*)(array + N), val);
}
bool dbg = true;
}  // namespace mydef
using namespace mydef;
#define pb push_back
//#define mp make_pair
#define eb emplace_back
#define lb lower_bound
#define ub upper_bound
#define all(v) (v).begin(), (v).end()
#define SZ(x) ((int)(x).size())
#define vi vector<int>
#define vvi vector<vector<int>>
#define vp vector<pair<int, int>>
#define vvp vector<vector<pair<int, int>>>
#define pi pair<int, int>
//#define P pair<int, int>
//#define V vector<int>
//#define S set<int>
#define asn ans


void solve() {
}

signed main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);

    int T;
    cin >> T;
    while (T--) {
        int n, m, a, b;
        cin >> n >> m >> a >> b;
        cout << floor_sum(n, m, a, b) << endl;
    }

    solve();
    return 0;
}


Compiler output:
a.cc:6:10: fatal error: atcoder/all: No such file or directory
    6 | #include "atcoder/all"
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

//#define _GLIBCXX_DEBUG
#include <atcoder/all>
#include <bits/stdc++.h>
using namespace std;
using namespace atcoder;
#define rep(i,n) for (int i = 0;i < (int)(n);i++)
using ll = long long;
const ll MOD=1000000007;
//const ll MOD=998244353;
const long long INF = 1LL << 60;
const double pi=acos(-1.0);
int dx[9] = {1, 0, -1, 0, 1, 1, -1, -1, 0};
int dy[9] = {0, 1, 0, -1, 1, -1, -1, 1, 0};
 
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
 
 
 
int main()
{
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  // cout << fixed << setprecision(15);
 
  ll T; cin>>T;
  rep(i,T){
    ll N,M,A,B; cin>>N>>M>>A>>B;
    cout<<floor_sum(N,M,A,B)<<'\n';
  }
  
  return 0;
}

Compiler output:
a.cc:2:10: fatal error: atcoder/all: No such file or directory
    2 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

/*
    Auther: ghoshashis545 Ashis Ghosh
    College: Jalpaiguri Govt Enggineering College
*/
#include<atcoder/all>
#include<bits/stdc++.h>
#include<string>
#include<algorithm>
using namespace std;
#define ll int
#define int long long
#define ld long double
#define ff first
#define ss string 
#define se second
#define endl "\n"
#define alt(v) v.begin(),v.end()
#define ralt(v) v.rbegin(),v.rend()
#define pb emplace_back
#define mp make_pair
#define debug(x) cerr << #x << " : " << x << '\n'
#define fab(i,a,b) for(int i=(a);i<(b);i++)
#define fba(i,a,b) for(int i=(b);i>=(a);i--)
int mod=1000000007;
// int mod=998244353;
int dx[]={-1,1,0,0,-1,-1,1,1};
int dy[]={0,0,1,-1,1,-1,1,-1};

bool test  = 1;

const int inf = 1e18;
const int N = 1e6 + 5;


int n,m,a,b;

void solve()
{
    cin >>n>>m>>a>>b;
    cout<<floor_sum(n,m,a,b)<<"\n";
   

}




    

















signed main()
{
    ios_base::sync_with_stdio(false);cin.tie(NULL);
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
    // precompute();
    int t=1;
    if(test)
    cin>>t;
    while(t--)
    {
        solve();
    }
    return 0;
}

Compiler output:
a.cc:5:9: fatal error: atcoder/all: No such file or directory
    5 | #include<atcoder/all>
      |         ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#include <atcoder/math>
using namespace std;
using namespace atcoder;
struct fast_ios { fast_ios(){ cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(20); }; } fast_ios_;
#define FOR(i, begin, end) for(int i=(begin);i<(end);i++)
#define REP(i, n) FOR(i,0,n)
#define IFOR(i, begin, end) for(int i=(end)-1;i>=(begin);i--)
#define IREP(i, n) IFOR(i,0,n)
#define Sort(v) sort(v.begin(), v.end())
#define Reverse(v) reverse(v.begin(), v.end())
#define all(v) v.begin(),v.end()
#define SZ(v) ((int)v.size())
#define Lower_bound(v, x) distance(v.begin(), lower_bound(v.begin(), v.end(), x))
#define Upper_bound(v, x) distance(v.begin(), upper_bound(v.begin(), v.end(), x))
#define chmax(a, b) a = max(a, b)
#define chmin(a, b) a = min(a, b)
#define bit(n) (1LL<<(n))
#define debug(x) cout << #x << "=" << x << endl;
#define vdebug(v) { cout << #v << "=" << endl; REP(i_debug, v.size()){ cout << v[i_debug] << ","; } cout << endl; }
#define mdebug(m) { cout << #m << "=" << endl; REP(i_debug, m.size()){ REP(j_debug, m[i_debug].size()){ cout << m[i_debug][j_debug] << ","; } cout << endl;} }
#define pb push_back
#define fi first
#define se second
#define int long long
#define INF 1000000000000000000
template<typename T> istream &operator>>(istream &is, vector<T> &v){ for (auto &x : v) is >> x; return is; }
template<typename T> ostream &operator<<(ostream &os, vector<T> &v){ for(int i = 0; i < v.size(); i++) { cout << v[i]; if(i != v.size() - 1) cout << endl; }; return os; }
template<typename T1, typename T2> ostream &operator<<(ostream &os, pair<T1, T2> p){ cout << '(' << p.first << ',' << p.second << ')'; return os; }
template<typename T> void Out(T x) { cout << x << endl; }
template<typename T1, typename T2> void chOut(bool f, T1 y, T2 n) { if(f) Out(y); else Out(n); }

using vec = vector<int>;
using mat = vector<vec>;
using Pii = pair<int, int>;
using v_bool = vector<bool>;
using v_Pii = vector<Pii>;

//int dx[4] = {1,0,-1,0};
//int dy[4] = {0,1,0,-1};
//char d[4] = {'D','R','U','L'};

const int mod = 1000000007;
//const int mod = 998244353;



signed main(){

    int T; cin >> T;
    REP(_, T){
        int n, m, a, b; cin >> n >> m >> a >> b;
        int ans = floor_sum(n, m, a, b);
        Out(ans);
    }

    return 0;
}


Compiler output:
a.cc:2:10: fatal error: atcoder/math: No such file or directory
    2 | #include <atcoder/math>
      |          ^~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>

#include <atcoder/all>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define FOR(i, a, b) for (int i = (a), i##_len = (b); i < i##_len; i++)
#define ALL(x) (x).begin(), (x).end()  // sortなどの引数を省略したい
#ifdef _DEBUG
#define PRE_COMMAND             \
    std::cin.rdbuf(in.rdbuf()); \
    std::cout << fixed << setprecision(15);
#else
#define PRE_COMMAND cout << fixed << setprecision(15);
#endif
const double EPS = 1e-10, PI = acos(-1.0);
template <class T> auto MAX(T& seq) {
    return *max_element(seq.begin(), seq.end());
}
template <class T> auto MIN(T& seq) {
    return *min_element(seq.begin(), seq.end());
}
template <class T> auto SUM(T& seq) {
    T temp{0};
    auto& temp2 = temp[0];
    return accumulate(seq.begin(), seq.end(), temp2);
}
template <class T> void SORT(T& seq) { sort(seq.begin(), seq.end()); }
template <class T, class S> void SORT(T& seq, S& sort_order) {
    sort(seq.begin(), seq.end(), sort_order);
}
template <class T> void SORTR(vector<T>& seq) {
    sort(seq.begin(), seq.end(), greater<T>());
}
template <class T, class S, class R> long long pow(T n_0, S k_0, R mod_0) {
    long long n = n_0, k = k_0, mod = mod_0, now = 1;
    while (true) {
        if (k & 1) { now = now * n % mod; }
        if ((k >>= 1) == 0) { return now; }
        n = (n * n) % mod;
    }
}

ll floor_sum(ll n, ll m, ll a, ll b) {
    ll ret = 0;
    if (b >= m) {
        ret += n * (b / m);
        b %= m;
    }
    if (a >= m) {
        ret += n * (n - 1) * (a / m) / 2;
        a %= m;
    }
    ll y = (a * n + b) / m;
    if (y == 0) { return ret; }
    b = a * n - m * y + b;
    ret += floor_sum(y, a, m, b);
    return ret;
}

int main() {
    PRE_COMMAND
    int q;
    cin >> q;
    ll n, m, a, b;
    for (int i = 0; i < q; i++) {
        cin >> n >> m >> a >> b;
        cout << floor_sum(n, m, a, b) << endl;
    }
}


Compiler output:
a.cc:3:10: fatal error: atcoder/all: No such file or directory
    3 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#import<atcoder/all>
namespace std{int main(){int n,m,a,b;cin>>n;while(cin>>n>>m>>a>>b)cout<<atcoder::floor_sum(n,m,a,b)<<' ';}}

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<atcoder/all>
      |  ^~~~~~
a.cc:1:8: fatal error: atcoder/all: No such file or directory
    1 | #import<atcoder/all>
      |        ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <iomanip>
#include <atcoder/math>

int main(void){
    std::cin.tie(nullptr); std::ios_base::sync_with_stdio(false);
    int n; std::cin >> n;
    while(n--){
        int n, m, a, b; std::cin >> n >> m >> a >> b;
        std::cout << atcoder::floor_sum(n, m, a, b) << '\n';
    }
    return 0;
}

Compiler output:
a.cc:3:10: fatal error: atcoder/math: No such file or directory
    3 | #include <atcoder/math>
      |          ^~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;

typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<long long> VL;
typedef vector<vector<long long>> VVL;
typedef pair<int,int> P;
typedef tuple<int,int,int> tpl;

#define ALL(a)  (a).begin(),(a).end()
#define SORT(c) sort((c).begin(),(c).end())
#define REVERSE(c) reverse((c).begin(),(c).end())
#define EXIST(m,v) (m).find((v)) != (m).end()
#define LB(a,x) lower_bound((a).begin(), (a).end(), x) - (a).begin()
#define UB(a,x) upper_bound((a).begin(), (a).end(), x) - (a).begin()

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define RFOR(i,a,b) for(int i=(a)-1;i>=(b);--i)
#define RREP(i,n) RFOR(i,n,0)

#define en "\n"

constexpr double EPS = 1e-9;
constexpr double PI  = 3.1415926535897932;
constexpr int INF = 2147483647;
constexpr long long LINF = 1LL<<60;
constexpr long long MOD = 1000000007; // 998244353;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }

void Main(){
    int N,M,A,B; cin >> N >> M >> A >> B;
    ll ans = atcoder::floor_sum(N,M,A,B);
    cout << ans << en;
    return;
}

int main(void){
    cin.tie(0);cout.tie(0);ios_base::sync_with_stdio(0);cout<<fixed<<setprecision(15);
    int t=1; cin>>t;
    REP(_,t) Main();
    return 0;
}

Compiler output:
a.cc:2:10: fatal error: atcoder/all: No such file or directory
    2 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include <cstring>
#include <chrono>
#include <random>
#include <queue>
#include <bitset>
#include <stack>
#include <functional>

// AtCoder
// Submit via the browser!
#include <atcoder/all>
using namespace atcoder;

#ifdef LOCAL
    #define eprintf(...) fprintf(stderr, __VA_ARGS__)
#else
    #define eprintf(...)
#endif

#define rep_(i, a_, b_, a, b, ...) for (int i = (a), i##_len = (b); i < i##_len; ++i)
#define rep(i, ...) rep_(i, __VA_ARGS__, __VA_ARGS__, 0, __VA_ARGS__)
#define reprev_(i, a_, b_, a, b, ...) for (int i = (b-1), i##_min = (a); i >= i##_min; --i)
#define reprev(i, ...) reprev_(i, __VA_ARGS__, __VA_ARGS__, 0, __VA_ARGS__)
#define all(x) (x).begin(), (x).end()
template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; }
template <class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; }
#define fls(x) (64 - __builtin_clzll(x))
#define pcnt(x) __builtin_popcountll(x)
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair <int,int> P;
typedef long double ld;

int main (void)
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll t; cin >> t;
    rep (_, t) {
        ll n, m, a, b; cin >> n >> m >> a >> b;
        cout << floor_sum(n, m, a, b) << "\n";
    }
    return 0;
}

Compiler output:
a.cc:26:10: fatal error: atcoder/all: No such file or directory
   26 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C

#include <cmath>
#include <algorithm>
#include <iostream>

using namespace std;
typedef long long ll;

ll floor_sum(ll n, ll m, ll a, ll b) {
  long long ans = 0;

  if (a >= m) {
    ans += (n - 1) * n * (a / m) / 2;
    a %= m;
  }

  if (b >= m) {
    ans += n * (b / m);
    b %= m;
  }

  ll y_max = (a * n + b) / m;
  ll x_max = (y_max * m - b);

  if (y_max == 0) return ans;

  ans += (n - (x_max + a - 1) / a) * y_max;
  ans += floor_sum(y_max, a, m, (a - x_max % a) % a);

  return ans;
}

int main() {
  int T;
  cin >> T;

  int N, M, A, B;
  for (int i = 0; i < T; ++i) {
    cin >> N >> M >> A >> B;

    cout << floor_sum(N, M, A, B) << endl;
  }

  return 0;
}


Compiler output:
main.c:1:10: fatal error: cmath: No such file or directory
    1 | #include <cmath>
      |          ^~~~~~~
compilation terminated.
Language: C++

// -----------------------------------
// author   : MatsuTaku
// country  : Japan
// created  : 09/08/20 03:55:25
// -----------------------------------

#include <bits/stdc++.h>
#include <atcoder/math.hpp>

using namespace std;
using ll = long long;

int main() {
  cin.tie(nullptr); ios::sync_with_stdio(false);

  int t; cin>>t;
  while (t--) {
    int n,m,a,b; cin>>n>>m>>a>>b;
    cout << atcoder::floor_sum(n, m, a, b); << endl;
  }

  return 0;
}


Compiler output:
a.cc:8:10: fatal error: atcoder/math.hpp: No such file or directory
    8 | #include <atcoder/math.hpp>
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <atcoder/all>
#include <bits/stdc++.h>
using namespace std;
using namespace atcoder;
typedef long long ll;

int main(){
  int T;
  cin >> T;
  
  for(int i = 0; i < T; ++i){
    ll n, m, a, b;
    std::cin >> n >> m >> a >> b;
    std::cout << floor_sum(n, m, a, b) << std::endl;
  }
}


Compiler output:
a.cc:1:10: fatal error: atcoder/all: No such file or directory
    1 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <atcoder/math>
#include <bits/stdc++.h>
using namespace std;
using namespace atcoder;
typedef long long ll;

int main(){
  int T;
  cin >> T;
  
  for(int i = 0; i < T; ++i){
    ll n, m, a, b;
    std::cin >> n >> m >> a >> b;
    std::cout << floor_sum(n, m, a, b) << std::endl;
  }
}

Compiler output:
a.cc:1:10: fatal error: atcoder/math: No such file or directory
    1 | #include <atcoder/math>
      |          ^~~~~~~~~~~~~~
compilation terminated.
Language: C++

/**
 *    author:  otera    
**/
#include<iostream>
#include<string> 
#include<cstdio>
#include<cstring>
#include<vector>
#include<cmath>
#include<algorithm> 
#include<functional>
#include<iomanip>
#include<queue>
#include<deque>
#include<ciso646>
#include<random>
#include<map>
#include <atcoder/modint>
#include<set>
#include<complex>
#include<bitset>
#include<stack>
#include<unordered_map>
#include<unordered_set>
#include<utility>
#include<cassert>
using namespace std;

#define int long long
typedef long long ll;
typedef unsigned long long ul;
typedef unsigned int ui;
typedef long double ld;
const int inf=1e9+7;
const ll INF=1LL<<60 ;
const ll mod=1e9+7 ;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
typedef complex<ld> Point;
const ld eps = 1e-8;
const ld pi = acos(-1.0);
typedef pair<int, int> P;
typedef pair<ld, ld> LDP;
typedef pair<ll, ll> LP;
#define fr first
#define sc second
#define all(c) c.begin(),c.end()
#define pb push_back
#define debug(x)  cerr << #x << " = " << (x) << endl;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

void solve() {
	
}

signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	//cout << fixed << setprecision(10);
	//int t; cin >> t; rep(i, t)solve();
	solve();
    return 0;
}

Compiler output:
a.cc:18:10: fatal error: atcoder/modint: No such file or directory
   18 | #include <atcoder/modint>
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#include <atcoder/all>

#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(int i=int(a);i<int(b);++i)
#define rep(...) _overload3(__VA_ARGS__,repi,_rep,)(__VA_ARGS__)

using namespace std;
using namespace atcoder;

using ll = long long;
using P = pair<int,int>;

constexpr int INF = 1001001001;

template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }

int main() {
    int n, m;
    cin >> n >> m;
    vector<string> S(n);
    rep (i, n) cin >> S[i];
    
    int s = n*m, t = s+1;
    mf_graph<int> g(t+1);
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < m; j++) {
            if (S[i][j] == '#')
                continue;
            if ((i+j) % 2 == 0)
                g.add_edge(s, i*m+j, 1);
            else
                g.add_edge(i*m+j, t, 1);
            if (j+1 < m && S[i][j+1] =='.') {
                if ((i+j) % 2 == 0)
                    g.add_edge(i*m+j, i*m+j+1, 1);
                else
                    g.add_edge(i*m+j+1, i*m+j, 1);
            }
            if (i+1 < n && S[i+1][j] =='.') {
                if ((i+j) % 2 == 0)
                    g.add_edge(i*m+j, (i+1)*m+j, 1);
                else
                    g.add_edge((i+1)*m+j, i*m+j, 1);
            }
        }
    }
    
    g.flow(s, t);
    int cnt = 0;
    auto ans = S;
    auto E = g.edges();
    for (auto e : E) {
        int a = e.from, b = e.to;
        if (a == s || a == t || b == s || b == t || e.flow != 1)
            continue;
        cnt++;
        if (a > b)
            swap(a, b);
        if (a+1 == b) {
            ans[a/m][a%m] = '>';
            ans[b/m][b%m] = '<';
        }
        else {
            ans[a/m][a%m] = 'v';
            ans[b/m][b%m] = '^';
        }
    }
    
    cout << cnt << endl;
    for (auto ai : ans)
        cout << ai << endl;
    
    return 0;
}


Compiler output:
a.cc:2:10: fatal error: atcoder/all: No such file or directory
    2 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#ifdef Rahul
#include "RAHUL.h"
#else
#include <bits/stdc++.h>
using namespace std;
#define error(...) 42;
#endif
#define SZ(v) int((v).size())
#define ALL(vec) begin(vec), end(vec)
typedef long long i64;
template<typename T> inline bool uax(T &x, T y) {return (y > x) ? x = y, true : false;}
template<typename T> inline bool uin(T &x, T y) {return (y < x) ? x = y, true : false;}
template<typename T> void kek(T ans) {cout << ans << endl; exit(0);}
#define Luv(...) [&] (auto &&u, auto &&v) { return __VA_ARGS__; }
const int MOD = (int) 1e9 + 7;
const i64 INF = (i64) 1e18 + 42;

#include "atcoder/maxflow"

int main() {
  cin.tie(nullptr) -> sync_with_stdio(false);
  
  int n, m; cin >> n >> m;
  vector<string> a(n);
  for (auto &s : a) cin >> s;
  atcoder::mf_graph<int> g(n * m + 2);
  int src = n * m, snk = n * m + 1;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) if (a[i][j] != '#') {
      int u = i * m + j;
      if ((i + j) & 1) {
        g.add_edge(u, snk, 1);
        if (i < n - 1 && a[i + 1][j] != '#') {
          g.add_edge(u + m, u, 1);
        }
        if (j < m - 1 && a[i][j + 1] != '#') {
          g.add_edge(u + 1, u, 1);
        }
      } else {
        g.add_edge(src, u, 1);
        if (i < n - 1 && a[i + 1][j] != '#') {
          g.add_edge(u, u + m, 1);
        }
        if (j < m - 1 && a[i][j + 1] != '#') {
          g.add_edge(u, u + 1, 1);
        }
      }
    }
  }
  cout << g.flow(src, snk) << '\n';
  for (auto e : g.edges()) {
    if (e.from == src || e.to == snk) continue;
    if (e.flow == 1) {
      auto [x1, y1] = array{e.from / m, e.from % m};
      auto [x2, y2] = array{e.to / m, e.to % m};
      if (x1 == x2) {
        if (y2 < y1) swap(y1, y2);
        a[x1][y1] = '>';
        a[x2][y2] = '<';
      } else {
        if (x2 < x1) swap(x1, x2);
        a[x1][y1] = 'v';
        a[x2][y2] = '^';
      }
    }
  }
  for (auto &s : a) cout << s << '\n';
}


Compiler output:
a.cc:18:10: fatal error: atcoder/maxflow: No such file or directory
   18 | #include "atcoder/maxflow"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <string>
#include <atcoder/maxflow>

#define amax(a, b) a = max(a, b)
#define amin(a, b) a = min(a, b)

using ll = long long;

int main() {
    int n, m;
    std::cin >> n >> m;
    std::vector<std::string> s(n);
    atcoder::mf_graph<int> graph(n * m + 2);
    int start = n * m, goal = n * m + 1;
    for (int i=0; i<n; i++) {
        std::cin >> s[i];
        for (int j=0; j<m; j++) {
            int idx = i * m + j;
            if (s[i][j] == '#') continue;
            if ((i + j) % 2) {
                if (i > 0)   graph.add_edge(idx, idx-m, s[i-1][j] == '.');
                if (i < n-1) graph.add_edge(idx, idx+m, s[i+1][j] == '.');
                if (j > 0)   graph.add_edge(idx, idx-1, s[i][j-1] == '.');
                if (j < m-1) graph.add_edge(idx, idx+1, s[i][j+1] == '.');

                graph.add_edge(start, idx, 1);
            } else {
                graph.add_edge(idx,  goal, 1;
            }
        }
    }
    std::cout << graph.flow(start, goal) << '\n';
    for (auto [from, to, cap, flow]:graph.edges()) {
        if (flow == 0 || from == start || to == goal) continue;
        if (from > to) std::swap(from, to);
        s[from / m][from % m] = (to - from == 1 ? '>' : 'v');
        s[to   / m][to   % m] = (to - from == 1 ? '<' : '^');
    }
    for (auto &si:s) std::cout << si << '\n';
    return 0;
}

Compiler output:
a.cc:6:10: fatal error: atcoder/maxflow: No such file or directory
    6 | #include <atcoder/maxflow>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
#include<atcoder/all>
#define int long long
using namespace std;
using namespace atcoder;
signed main(){
  int N,M;
  cin>>N>>M;
  vector<string> A(N);
  for(string &S:A)cin>>S;
  mf_graph<int> G(N*M+2);
  int s=N*M,t=N*M+1;
  for(int i=0;i<N;i++)
    for(int j=0;j<M;j++)
      if(A[i][j]=='.'){
        if((i+j)%2==0)G.add_edge(s,i*M+j,1);
        else G.add_edge(i*M+j,t,1);
      }
  for(int i=0;i<N;i++)
    for(int j=i%2;j<M;j+=2){
      if(j!=0 && A[i][j]=='.' && A[i][j-1]=='.')G.add_edge(i*M+j,i*M+j-1,1);
      if(i!=0 && A[i][j]=='.' && A[i-1][j]=='.')G.add_edge(i*M+j,(i-1)*M+j,1);
      if(j!=M-1 && A[i][j]=='.' && A[i][j+1]=='.')G.add_edge(i*M+j,i*M+j+1,1);
      if(i!=N-1 && A[i][j]=='.' && A[i+1][j]=='.')G.add_edge(i*M+j,(i+1)*M+j,1);
    }
  cout<<G.flow(N*M,N*M+1)<<endl;
  for(auto e:G.edges()){
    if(e.from==s || e.to==t || e.flow==0)continue;
    int x1=e.from/M,y1=e.from%M,x2=e.to/M,y2=e.to%M;
    if(x1+1==x2)A[x1][y1]='v',A[x2][y2]='^';
    if(x1-1==x2)A[x1][y1]='^',A[x2][y2]='v';
    if(y1+1==y2)A[x1][y1]='>',A[x2][y2]='<';
    if(y1-1==y2)A[x1][y1]='<',A[x2][y2]='>';
  }
  for(string S:A)cout<<S<<endl;
}

Compiler output:
a.cc:2:9: fatal error: atcoder/all: No such file or directory
    2 | #include<atcoder/all>
      |         ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <stdio.h>
#include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <algorithm>
#include <atcoder/all>

using ll = long long int;
const int INF = (1<<25);
const ll INFLL = (1ll<<60);
const ll MOD = (ll)(1e9+7);

#define l_ength size

void mul_mod(ll& a, ll b){
	a *= b;
	a %= MOD;
}

void add_mod(ll& a, ll b){
	a = (a<MOD)?a:(a-MOD);
	b = (b<MOD)?b:(b-MOD);
	a += b;
	a = (a<MOD)?a:(a-MOD);
}

int n,m,dx[4]={-1,0,0,1},dy[4]={0,-1,1,0};

std::string s[111];

bool check(int i, int j){
	return (0<=i&&i<n&&0<=j&&j<m&&s[i][j]=='.');
}

int main(void){
	int i,j,k,x,y;
	std::cin >> n >> m;
	atcoder::mf_graph<int> g(n*m+2);
	for(i=0; i<n; ++i){
		std::cin >> s[i];
	}
	for(i=0; i<n; ++i){
		for(j=0; j<m; ++j){
			if(!check(i,j)){
				continue;
			}
			if((i+j)%2){
				g.add_edge(i*m+j,n*m+1,1);
				continue;
			}
			g.add_edge(n*m,i*m+j,1);
			for(k=0; k<4; ++k){
				if(check(i+dx[k],j+dy[k])){
					g.add_edge(i*m+j,(i+dx[k])*m+(j+dy[k]),1);
				}
			}
		}
	}
	std::cout << g.flow(n*m,n*m+1) << std::endl;
	auto v = g.edges();
	for(auto e: v){
		if(e.from == n*m){
			continue;
		}
		if(e.to == n*m+1){
			continue;
		}
		if(!e.flow){
			continue;
		}
		i = e.from/m; j = e.from%m;
		x = e.to/m; y = e.to%m;
		if(i>x){
			s[x][y] = 'v';
			s[i][j] = '^';
		}else if(i<x){
			s[i][j] = 'v';
			s[x][y] = '^';
		}else if(j>y){
			s[x][y] = '>';
			s[i][j] = '<';
		}else{
			s[i][j] = '>';
			s[x][y] = '<';
		}
	}
	for(i=0; i<n; ++i){
		std::cout << s[i] << std::endl;
	}
	return 0;
}


Compiler output:
a.cc:7:10: fatal error: atcoder/all: No such file or directory
    7 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.