Skip to content

Commit

Permalink
61-9kyo-hwang
Browse files Browse the repository at this point in the history
  • Loading branch information
9kyo-hwang committed Aug 8, 2024
1 parent 30b109d commit 9208996
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#include <string>
#include <vector>
#include <algorithm>

using namespace std;

int solution(vector<vector<int>> Data, int Col, int RowBegin, int RowEnd)
{
sort(Data.begin(), Data.end(), [&](const auto& Lhs, const auto& Rhs)
{
return Lhs[Col - 1] == Rhs[Col - 1] ? Lhs[0] > Rhs[0] : Lhs[Col - 1] < Rhs[Col - 1];
});

int HashVal = 0;
for(int i = RowBegin; i <= RowEnd; ++i)
{
int S_i = 0;
for(const int Val : Data[i - 1])
{
S_i += Val % i;
}
HashVal ^= S_i;
}

return HashVal;
}
3 changes: 2 additions & 1 deletion 9-kyo-hwang/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,5 @@
| 57์ฐจ์‹œ | 2024.7.15 | Dynamic Programming | [17070 ํŒŒ์ดํ”„ ์˜ฎ๊ธฐ๊ธฐ 1](https://www.acmicpc.net/problem/17070) | [#206](https://github.com/AlgoLeadMe/AlgoLeadMe-3/pull/206) |
| 58์ฐจ์‹œ | 2024.7.29 | Trie | [14725 ๊ฐœ๋ฏธ๊ตด](https://www.acmicpc.net/problem/14725) | [#207](https://github.com/AlgoLeadMe/AlgoLeadMe-3/pull/207) |
| 59์ฐจ์‹œ | 2024.8.01 | Greedy | [๋งˆ๋ฒ•์˜ ์—˜๋ฆฌ๋ฒ ์ดํ„ฐ](https://school.programmers.co.kr/learn/courses/30/lessons/148653) | [#210](https://github.com/AlgoLeadMe/AlgoLeadMe-3/pull/210) |
| 60์ฐจ์‹œ | 2024.8.05 | Implementation | [๊ณผ์ œ ์ง„ํ–‰ํ•˜๊ธฐ](https://school.programmers.co.kr/learn/courses/30/lessons/176962) | [#213](https://github.com/AlgoLeadMe/AlgoLeadMe-3/pull/213) |
| 60์ฐจ์‹œ | 2024.8.05 | Implementation | [๊ณผ์ œ ์ง„ํ–‰ํ•˜๊ธฐ](https://school.programmers.co.kr/learn/courses/30/lessons/176962) | [#213](https://github.com/AlgoLeadMe/AlgoLeadMe-3/pull/213) |
| 60์ฐจ์‹œ | 2024.8.08 | Implementation | [ํ…Œ์ด๋ธ” ํ•ด์‹œ ํ•จ์ˆ˜](https://school.programmers.co.kr/learn/courses/30/lessons/147354) | [#214](https://github.com/AlgoLeadMe/AlgoLeadMe-3/pull/214) |

0 comments on commit 9208996

Please sign in to comment.