This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() { | |
int a, b, c, total = 0; | |
cin >> a >> b >> c; | |
while (a != 0) { | |
if (a * 2 <= b && a * 4 <= c) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() { | |
long long diplomas, certificates, n, k, nonwinners; | |
cin >> n >> k; | |
diplomas = (n / 2) / (k + 1); | |
certificates = k * diplomas; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <math.h> | |
using namespace std; | |
int main() { | |
long long n, m, k, r, val; | |
cin >> n >> m >> k; | |
long long c[m], rmn = k; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main () { | |
int M, N, Dominos; | |
cin >> M >> N; | |
Dominos = (M * N) / 2; | |
cout << Dominos; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <algorithm> | |
using namespace std; | |
int main () { | |
int n; | |
cin >> n; | |
int ar[n]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main () { | |
int n; | |
cin >> n; | |
int ar[n]; | |
for (int i = 0; i < n; i++) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main () { | |
int n, m; | |
cin >> n >> m; | |
int ans = n + (n - 1) / (m - 1); | |
cout << ans; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main () { | |
long n; | |
cin >> n; | |
long ar[n]; | |
bool won = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() { | |
long long n, c, words = 1; | |
cin >> n >> c; | |
long ar[n]; | |
for (int i = 0; i < n; i++) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() { | |
long n, a, b, c = 0, unserved = 0; | |
cin >> n >> a >> b; | |
long group[n]; | |
for (int i = 0; i < n; i++) { |