제출 #831751

#제출 시각아이디문제언어결과실행 시간메모리
831751Chal1shkanSob (COCI19_sob)C++14
110 / 110
61 ms7164 KiB
# include <bits/stdc++.h>

# define pb push_back
# define ff first
# define ss second
# define nl'\n'
# define pii pair <int, int>
# define pll pair <ll, ll>

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
  
const ll maxn = 2e5 + 25;
const ll maxl = 18 + 0;
const ll inf = 2e9 + 0;
const ll mod = 998244353;

using namespace std;

void ma1n ()
{
	int n, m;
	cin >> n >> m;
	int i = n - 1, j = m;
	while (i >= 0)
	{
		int prev1 = i, prev2 = j;
		while (j < n + m)
		{
			if ((i & j) == i)
			{
				break;
			}
			++j;
		}
		int copy = j, copy1 = i;
		while (copy >= prev2)
		{
			cout << i << ' ' << copy << nl;
			--i, --copy;
		}
		j++;
	}
}

int main ()
{  
	ios::sync_with_stdio(false);
    cin.tie(0); 
	int zxc = 1;
//	cin >> zxc;
    while (zxc--)	
    {
        ma1n ();
    }
    return 0;
}

컴파일 시 표준 에러 (stderr) 메시지

sob.cpp:6:10: warning: ISO C++11 requires whitespace after the macro name
    6 | # define nl'\n'
      |          ^~
sob.cpp: In function 'void ma1n()':
sob.cpp:28:7: warning: unused variable 'prev1' [-Wunused-variable]
   28 |   int prev1 = i, prev2 = j;
      |       ^~~~~
sob.cpp:37:17: warning: unused variable 'copy1' [-Wunused-variable]
   37 |   int copy = j, copy1 = i;
      |                 ^~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...