Dream-Sugar

217

WKRyyds

yxc
JasonisJason
dsc182
noSorryMaker

jimmy2021
Collapse
BT7274

dream_sugar 的运势
§ 中平 §

dream_sugar 的运势
§ 小吉 §

100%消化

dream_sugar 的运势
§ 中吉 §

# 2022.1.17

(●’◡’●)

#include <iostream>
#include <cstring>
#include <algorithm>

using namespace std;

int b[1000010];

int main()
{
int n, k;
cin >> n >> k;
for (int i = 1; i <= k; i ++)
{
int l, r;
cin >> l >> r;
b[l] ++;
b[r + 1] --;
}
for(int i = 1; i <= n; i ++) b[i] += b[i - 1];
sort (b + 1, b + n + 1);
cout << b[(n + 1) >> 1];
return 0;
}


# 2022.1.17

(╹▽╹)

#include <string>
#include <iostream>
using namespace std;

int main ()
{
string a, b; cin >> a >> b;
for (int i = 0; i < a.size(); i ++ )
for (int j = 0; j < b.size(); j ++ )
for (char k = '0'; k <= '2'; k ++ )
{
string ra = a; ra[i] ^= 1;
string rb = b; if (b[j] == k) continue; rb[j] = k;
int x = 0, y = 0;
for (int i = 0; i < ra.size(); i ++ ) x = x * 2 + ra[i] - '0';
for (int i = 0; i < rb.size(); i ++ ) y = y * 3 + rb[i] - '0';
if (x == y) return cout << x << endl, 0;
}
return 0;
}


dream_sugar 的运势
§ 中平 §

# 2022.1.14

#include <iostream>

using namespace std;

int main()
{
int a, b, c, d;
cin >> a >> b >> c >> d;
if (b > c && d > a && c + d > a + b && c > 0 && d > 0 && a % 2 == 0) puts("Valores aceitos");
else puts("Valores nao aceitos");

return 0;
}


dream_sugar 的运势
§ 大吉 §

# 2022.1.13

#include <iostream>

using namespace std;

int main()
{
double m;
cin >> m;

int n = m * 100;
int a[] = {100, 50, 20, 10, 5, 2};
int b[] = {100, 50, 25, 10, 5, 1};

puts("NOTAS:");
for (int i = 0; i < 6; i ++ )
{
printf("%d nota(s) de R$%.2lf\n", n / (a[i] * 100), (double)a[i]); n %= a[i] * 100; } puts("MOEDAS:"); for (int i = 0; i < 6; i ++ ) { printf("%d moeda(s) de R$ %.2lf\n", n / b[i], b[i] / 100.0);
n %= b[i];
}

return 0;
}


# 2022.1.13

#include <iostream>

using namespace std;

int main()
{
int n;
cin >> n;
int years = n / 365;
int months = n % 365 / 30;
int days = n % 365 % 30;

printf("%d ano(s)\n%d mes(es)\n%d dia(s)\n", years, months, days);

return 0;
}