Submission #33477308
Source Code Expand
#include <bitset>
#include <iostream>
int main() {
int l1, r1, l2, r2;
std::cin >> l1 >> r1 >> l2 >> r2;
std::bitset<100> o;
auto a1 = ~(~o << (r1 - l1)) << l1;
auto a2 = ~(~o << (r2 - l2)) << l2;
std::cout << (a1 & a2).count() << '\n';
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - Intersection |
| User | rsk0315 |
| Language | C++ (GCC 9.2.1) |
| Score | 100 |
| Code Size | 265 Byte |
| Status | AC |
| Exec Time | 7 ms |
| Memory | 3516 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | example_00.txt, example_01.txt, example_02.txt |
| All | example_00.txt, example_01.txt, example_02.txt, hand_00.txt, hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.txt, hand_06.txt, hand_07.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| example_00.txt | AC | 7 ms | 3344 KiB |
| example_01.txt | AC | 3 ms | 3368 KiB |
| example_02.txt | AC | 2 ms | 3424 KiB |
| hand_00.txt | AC | 2 ms | 3396 KiB |
| hand_01.txt | AC | 3 ms | 3456 KiB |
| hand_02.txt | AC | 2 ms | 3336 KiB |
| hand_03.txt | AC | 2 ms | 3516 KiB |
| hand_04.txt | AC | 2 ms | 3404 KiB |
| hand_05.txt | AC | 3 ms | 3484 KiB |
| hand_06.txt | AC | 3 ms | 3428 KiB |
| hand_07.txt | AC | 2 ms | 3428 KiB |