51nod 1024 矩阵中不重复的元素
2017-05-16 20:58
225 查看
数据量很小,直接暴力,,先取对数再暴力。
#include <iostream> #include <set> #include <cmath> using namespace std; int main() { set<double> sets; ios::sync_with_stdio(false); int m,n,a,b; cin >> m >> n >> a >> b; for(int i = a; i < a+n; ++i) { for(int j = b; j < b+m; ++j) { double temp = 1.0*j*log2(1.0*i); sets.insert(temp); } } cout << sets.size() << endl; return 0; }
相关文章推荐
- 51nod 1024 矩阵中不重复的元素
- 51nod 1024 矩阵中不重复的元素
- 51Nod 1024 矩阵中不重复的元素
- 51Nod 1024 矩阵中不重复的元素 | 技巧 数学
- 51nod-1024 矩阵中不重复的元素
- 51nod 1024 矩阵中不重复的元素
- 51nod 1024 矩阵中不重复的元素
- 51NOD 1024 矩阵中不重复的元素
- 51nod 1024 矩阵中不重复的元素(简单粗暴)
- 51nod 1024 矩阵中不重复的元素
- 51Nod 1024 矩阵中不重复的元素
- 51nod 1024 矩阵中不重复的元素 (STL)
- 51nod_1024 矩阵中不重复的元素(对数求解·)
- 51NOD 1024 矩阵中不重复的元素
- 51nod 1024 矩阵中不重复的元素
- 51nod 1024 矩阵中不重复的元素(技巧)
- 51nod 1024 矩阵中不重复的元素
- 51nod 1024 矩阵中不重复的元素
- 1024 矩阵中不重复的元素
- 51 NOD 1024 矩阵中不重复的元素(技巧)