제출 #254637

#제출 시각아이디문제언어결과실행 시간메모리
254637MrRobot_28Sob (COCI19_sob)C++17
110 / 110
90 ms7416 KiB
#include <bits/stdc++.h>
                  
using namespace std;

signed main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	int n, m;
	cin >> n >> m;
	int n1 = n;
	n--;
	while(n >= 0)
	{
		int j = m;
		while((n & j) != n)
		{
			j++;
		}
		for(int k = j; k >= m; k--)
		{
			cout << n-- << " " << k << "\n";
		}
		m = j + 1;
	}
	return 0;
}

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

sob.cpp: In function 'int main()':
sob.cpp:11:6: warning: unused variable 'n1' [-Wunused-variable]
  int n1 = n;
      ^~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...