QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#616727#9189. Make them Meetliuziao10 0ms3820kbC++231.2kb2024-10-06 10:46:372024-10-06 10:46:39

Judging History

你现在查看的是最新测评结果

  • [2024-10-06 10:46:39]
  • 评测
  • 测评结果:10
  • 用时:0ms
  • 内存:3820kb
  • [2024-10-06 10:46:37]
  • 提交

answer

#include <bits/stdc++.h>

// #define int int64_t

const int kMaxN = 105, kMaxM = 1e4 + 5;

int n, m;
int u[kMaxM], v[kMaxM];

namespace Sub1 {
std::vector<std::vector<int>> res;

bool check() {
  for (int i = 1; i <= m; ++i)
    if (u[i] != 1 && v[i] != 1)
      return 0;
  return 1;
}

void solve() {
  std::vector<int> tmp;
  for (int i = 1; i <= n; ++i) tmp.emplace_back(1);
  res.emplace_back(tmp);
  for (auto &x : tmp) x = 0;
  tmp[0] = tmp[1] = 1;
  std::cerr << "!!!\n";
  res.emplace_back(tmp);
  for (auto &x : tmp) x = 1;
  res.emplace_back(tmp);
  std::cout << res.size() << '\n';
  for (auto &vec : res) {
    for (auto x : vec) std::cout << x << ' ';
    std::cout << '\n';
  }
}
} // namespace Sub1

void dickdreamer() {
  std::cin >> n >> m;
  for (int i = 1; i <= m; ++i) {
    std::cin >> u[i] >> v[i];
    ++u[i], ++v[i];
  }
  if (Sub1::check()) Sub1::solve();
}

int32_t main() {
#ifdef ORZXKR
  freopen("in.txt", "r", stdin);
  freopen("out.txt", "w", stdout);
#endif
  std::ios::sync_with_stdio(0), std::cin.tie(0), std::cout.tie(0);
  int T = 1;
  // std::cin >> T;
  while (T--) dickdreamer();
  // std::cerr << 1.0 * clock() / CLOCKS_PER_SEC << "s\n";
  return 0;
}

详细

Subtask #1:

score: 10
Accepted

Test #1:

score: 10
Accepted
time: 0ms
memory: 3540kb

input:

2 1
0 1

output:

3
1 1 
1 1 
1 1 

result:

points 1.0

Test #2:

score: 10
Accepted
time: 0ms
memory: 3816kb

input:

3 2
0 1
0 2

output:

3
1 1 1 
1 1 0 
1 1 1 

result:

points 1.0

Test #3:

score: 10
Accepted
time: 0ms
memory: 3692kb

input:

4 3
0 1
0 2
0 3

output:

3
1 1 1 1 
1 1 0 0 
1 1 1 1 

result:

points 1.0

Test #4:

score: 10
Accepted
time: 0ms
memory: 3540kb

input:

99 98
0 1
0 2
0 3
0 4
0 5
0 6
0 7
0 8
0 9
0 10
0 11
0 12
0 13
0 14
0 15
0 16
0 17
0 18
0 19
0 20
0 21
0 22
0 23
0 24
0 25
0 26
0 27
0 28
0 29
0 30
0 31
0 32
0 33
0 34
0 35
0 36
0 37
0 38
0 39
0 40
0 41
0 42
0 43
0 44
0 45
0 46
0 47
0 48
0 49
0 50
0 51
0 52
0 53
0 54
0 55
0 56
0 57
0 58
0 59
0 60
0 6...

output:

3
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

result:

points 1.0

Test #5:

score: 10
Accepted
time: 0ms
memory: 3596kb

input:

100 99
0 1
0 2
0 3
0 4
0 5
0 6
0 7
0 8
0 9
0 10
0 11
0 12
0 13
0 14
0 15
0 16
0 17
0 18
0 19
0 20
0 21
0 22
0 23
0 24
0 25
0 26
0 27
0 28
0 29
0 30
0 31
0 32
0 33
0 34
0 35
0 36
0 37
0 38
0 39
0 40
0 41
0 42
0 43
0 44
0 45
0 46
0 47
0 48
0 49
0 50
0 51
0 52
0 53
0 54
0 55
0 56
0 57
0 58
0 59
0 60
0 ...

output:

3
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

result:

points 1.0

Subtask #2:

score: 0
Wrong Answer

Test #6:

score: 13
Accepted
time: 0ms
memory: 3820kb

input:

2 1
0 1

output:

3
1 1 
1 1 
1 1 

result:

points 1.0

Test #7:

score: 0
Wrong Answer
time: 0ms
memory: 3532kb

input:

3 3
1 2
0 1
0 2

output:


result:

wrong output format Unexpected end of file - int32 expected

Subtask #3:

score: 0
Wrong Answer

Test #15:

score: 11
Accepted
time: 0ms
memory: 3624kb

input:

2 1
0 1

output:

3
1 1 
1 1 
1 1 

result:

points 1.0

Test #16:

score: 0
Wrong Answer
time: 0ms
memory: 3556kb

input:

3 2
0 1
1 2

output:


result:

wrong output format Unexpected end of file - int32 expected

Subtask #4:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #3:

0%

Subtask #5:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

0%