Submission #999039

# Submission time Handle Problem Language Result Execution time Memory
999039 2024-06-15T05:32:33 Z vjudge1 Konstrukcija (COCI20_konstrukcija) C++17
30 / 110
10 ms 348 KB
#include<iostream>

using namespace std;

int main()
{
  int k;
  cin >> k;
  if(k >= 1)
    {
      cout << k + 3 << ' ' << 2 * (k + 1) << endl;
      for(int i = 2; i < k + 3; i++)
	cout << 1 << ' ' << i << endl;
      for(int i = 2; i < k + 3; i++)
	cout << i << ' ' << k + 3 << endl;
    }
  else if(k == 0)
    {
      cout << 3 << ' ' << 2 << endl;
      cout << 1 << ' ' << 2 << endl;
      cout << 2 << ' ' << 3 << endl;
     }
  else
    {
      int a = abs(k) - 1;
      cout << 6 + a << ' ' << 3 * a + 8 << endl;
      cout << "1 2\n";
      cout << "1 3\n";
      cout << "2 4\n";
      cout << "2 5\n";
      cout << "3 4\n";
      cout << "3 5\n";

      cout << 4 << ' ' << a + 6 << endl; 
      cout << 5 << ' ' << a + 6 << endl;

      for(int i = 6; i < a + 6; i++)
	{
	  cout << 1 << ' ' << i << endl;
	  cout << i << ' ' << 4 << endl;
	  cout << i << ' ' << 5 << endl;
	}


      
    }
  return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Correct.
2 Correct 0 ms 348 KB Correct.
3 Correct 1 ms 348 KB Correct.
4 Correct 0 ms 348 KB Correct.
5 Correct 1 ms 348 KB Correct.
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Correct.
2 Correct 1 ms 348 KB Correct.
3 Correct 1 ms 348 KB Correct.
4 Correct 1 ms 348 KB Correct.
5 Correct 1 ms 348 KB Correct.
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Correct.
2 Correct 0 ms 348 KB Correct.
3 Correct 1 ms 348 KB Correct.
4 Correct 0 ms 348 KB Correct.
5 Correct 1 ms 348 KB Correct.
6 Correct 0 ms 348 KB Correct.
7 Correct 1 ms 348 KB Correct.
8 Correct 1 ms 348 KB Correct.
9 Correct 1 ms 348 KB Correct.
10 Correct 1 ms 348 KB Correct.
11 Incorrect 10 ms 348 KB Integer parameter [name=N] equals to 4877, violates the range [1, 1000]
12 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Correct.
2 Correct 0 ms 348 KB Correct.
3 Correct 1 ms 348 KB Correct.
4 Correct 0 ms 348 KB Correct.
5 Correct 1 ms 348 KB Correct.
6 Correct 0 ms 348 KB Correct.
7 Correct 1 ms 348 KB Correct.
8 Correct 1 ms 348 KB Correct.
9 Correct 1 ms 348 KB Correct.
10 Correct 1 ms 348 KB Correct.
11 Incorrect 10 ms 348 KB Integer parameter [name=N] equals to 4877, violates the range [1, 1000]
12 Halted 0 ms 0 KB -