update gitignore. update compile.sh

This commit is contained in:
2025-05-03 01:36:06 +03:00
parent 689b148736
commit 96b0571d30
7 changed files with 10 additions and 130 deletions
+5 -7
View File
@@ -2,20 +2,18 @@
#include <vector>
#include <algorithm>
bool comp(unsigned int a, unsigned int b) {
int cnt_bit(unsigned int a) {
int res1 = 0;
while (a != 0) {
res1 += a & 1;
a = a >> 1;
}
int res2 = 0;
while (b != 0) {
res2 += b & 1;
b = b >> 1;
}
return res1;
}
return res1 < res2;
bool comp(unsigned int a, unsigned int b) {
return cnt_bit(a) < cnt_bit(b);
}
+2 -2
View File
@@ -11,12 +11,12 @@ int main() {
mp[name].push_back(grade);
}
for (auto x : mp) {
for (auto& x : mp) {
std::cout << x.first << " ";
double tmp = 0;
int n = 0;
for (auto i : x.second) {
for (auto& i : x.second) {
tmp += i;
++n;
}
+1 -1
View File
@@ -18,7 +18,7 @@ int main() {
mp[std::make_pair(r, c)] %= mod;
}
for (auto x : mp) {
for (auto& x : mp) {
if (x.second) std::cout << x.first.first << " " << x.first.second << " " << x.second << std::endl;
}