Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

 
 
 
 
General
 
 
# Author Problem Lang Verdict Time Memory Sent Judged  
26363334 Practice:
max.strelbitski
749A - 24 GNU C++11 Accepted 31 ms 2052 KB 2017-04-14 20:28:36 2017-04-14 20:28:36
→ Source
/*
Author: Maksym Strelbitskyi
Vinnytsia - 2017
*/

#define _CRT_DISABLE_PERFCRIT_LOCKS
#define _CRT_SECURE_NO_WARNINGS
#pragma comment (linker, "/STACK:64000000")

#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>

using namespace std;

#define forn(m,n) for (int i=m; i<n; i++)
#define form(k,m) for (int j=k; j<m; j++)
#define int64 long long int
#define uint64 unsigned long long int
#define uint unsigned int
#define vi vector<int>
#define si set<int>
#define pi pair<int,int>
#define mp make_pair

template <class T> T gcd(T a, T b) {
	while (b) { a %= b; swap(a, b); } return a;
}

#define INF 1000000007

void solve() {
	// solution
	int n;
	cin >> n;
	cout << n / 2 << endl;
	forn(0, (n / 2 - 1)) cout << "2 ";
	if (n % 2) cout << "3"; else cout << "2";
}

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
#ifdef MYDEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
	unsigned int start = clock(), fin;
#endif
	solve();
#ifdef MYDEBUG
	fin = clock();
	cout << "\n\nTime: " << fin - start << " ms.";
#endif
	return 0;
}
?
Time: ? ms, memory: ? KB
Verdict: ?
Input
?
Participant's output
?
Jury's answer
?
Checker comment
?
Diagnostics
?
Click to see test details